Fix agent host telemetry log collision to prevent rotation failures - #334870
Open
Benjamin Christopher Simmonds (benibenj) wants to merge 1 commit into
Open
Fix agent host telemetry log collision to prevent rotation failures#334870Benjamin Christopher Simmonds (benibenj) wants to merge 1 commit into
Benjamin Christopher Simmonds (benibenj) wants to merge 1 commit into
Conversation
Copilot started reviewing on behalf of
Benjamin Christopher Simmonds (benibenj)
September 7, 2026 09:08
View session
Dmitriy Vasyura (dmitrivMS)
approved these changes
Sep 7, 2026
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The focused change preserves existing behavior while eliminating the identified log-file collision.
Review tier: Balanced
Findings: None
What changed in this PR
Separates Agent Host telemetry diagnostics from the main telemetry log to prevent cross-process rotation collisions.
Changes:
- Adds configurable logger IDs while preserving existing callers.
- Uses
agentHostTelemetry.logfor Agent Host telemetry. - Adds regression coverage for custom logger IDs.
| File | Description |
|---|---|
src/vs/platform/telemetry/common/telemetryLogAppender.ts |
Supports an explicit logger ID. |
src/vs/platform/agentHost/node/agentHostTelemetryService.ts |
Selects the Agent Host-specific telemetry log. |
src/vs/platform/telemetry/test/common/telemetryLogAppender.test.ts |
Verifies custom logger-ID selection. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request addresses a critical issue with telemetry log rotation failures in the Agent Host due to a file collision.
Changes Made
agentHostTelemetryService.tsto write telemetry diagnostics to a new log file namedagentHostTelemetry.log, preventing conflicts with the main process'stelemetry.log.telemetryLogAppender.tsto support an explicit logger ID while maintaining compatibility with existing callers.telemetryLogAppender.test.tsto ensure the new logging behavior is validated.Validation
TelemetryLogAdapterandAgentHostTelemetryServicepassed successfully.Other potential issues related to
agenthost.logrotation failures and extension-host warnings were identified but not addressed in this PR, as their root causes were not clear enough for a safe fix.