Add agent host user message telemetry#316797
Merged
roblourens merged 7 commits intoMay 17, 2026
Merged
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds an Agent Host-local ITelemetryService and emits a proof-of-concept agentHostUserMessageSent telemetry event whenever a user message is sent to an agent (both direct and queued paths).
Changes:
- New
createAgentHostTelemetryServicefactory builds aTelemetryService(with log + 1DS appenders) for the agent host utility and standalone server entrypoints. AgentServicenow accepts and registersITelemetryServicein its DI container;AgentSideEffectsconsumes it and logsagentHostUserMessageSentwithprovider,source,hasAttachments,attachmentCountfor both direct and queued send paths.- Adds tests using a local
TestTelemetryServicecovering direct and queued telemetry payloads.
Show a summary per file
| File | Description |
|---|---|
| src/vs/platform/agentHost/node/agentHostTelemetryService.ts | New factory wiring real telemetry (config service, 1DS + log appenders, machine IDs) for the agent host. |
| src/vs/platform/agentHost/node/agentHostMain.ts | Converts entrypoint to async, builds telemetry service and registers it in the DI container; passes it to AgentService. |
| src/vs/platform/agentHost/node/agentHostServerMain.ts | Wires the new telemetry service for the standalone server (disabled when --quiet). |
| src/vs/platform/agentHost/node/agentService.ts | Accepts optional ITelemetryService (default NullTelemetryService) and exposes it via DI. |
| src/vs/platform/agentHost/node/agentSideEffects.ts | Injects ITelemetryService and logs agentHostUserMessageSent on direct/queued send paths. |
| src/vs/platform/agentHost/test/node/agentSideEffects.test.ts | Adds TestTelemetryService and tests for telemetry payloads on direct and queued sends. |
Copilot's findings
- Files reviewed: 6/6 changed files
- Comments generated: 0
Use root config to propagate the client telemetry level into the Agent Host process and clamp Agent Host telemetry to the most restrictive level. Also forwards parent process telemetry disablement into spawned Agent Host processes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Resolve the remote Agent Host protocol client conflict by preserving telemetry-level propagation and adopting main's liveness timer initialization. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Move the agentHostUserMessageSent event payload, classification, and publicLog2 call out of AgentSideEffects into a focused helper class. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Rename the user-message event to agentHost.userMessageSent and include safe session and active-client metadata that is available at send time. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Remove boolean fields that can be derived from turnCount, activeClientId, and attachmentCount. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Classify Agent Host protocol IDs as system metadata instead of end-user pseudonymized information. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
dmitrivMS
approved these changes
May 17, 2026
Closed
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 adds an Agent Host-local ITelemetryService wiring and emits a simple proof event when a user message is sent to an agent host session.
Summary:
Validation: