agentHost: classify Copilot SKU telemetry context - #333853
Merged
Aaron Munger (amunger) merged 5 commits intoSep 1, 2026
Merged
Conversation
Declare the dynamically injected copilotSku property on each applicable Agent Host event so telemetry extraction generates ingestion schemas that accept it. Keep runtime population centralized through the common-property path. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Forwarded Copilot SDK schemas remain unclassified, and account transitions can retain a stale SKU.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review tier: Balanced
Findings: 2
New issues introduced by this change (2)
| Severity | Finding |
|---|---|
src/vs/platform/agentHost/node/agentHostTelemetryReporter.ts — Once this optional property has been set, it cannot become absent:… |
|
src/vs/platform/agentHost/node/agentHostTelemetryReporter.ts — The new per-event classification misses the five manually classified copilotSdk/* events in… |
What changed in this PR
Adds optional Copilot SKU classification to Agent Host telemetry schemas so enriched events remain in classified ingestion tables.
Changes:
- Adds reusable SKU telemetry/GDPR fragments across 28 event schemas.
- Removes the global SKU GDPR declaration.
- Reserves
copilotSkuagainst payload duplication.
| File | Description |
|---|---|
editSurvivalReporter.ts |
Classifies SKU for edit survival. |
editArcReporter.ts |
Classifies SKU for edit arcs. |
copilotTodoStoreTelemetry.ts |
Classifies SKU for todo operations. |
copilotFailureTelemetry.ts |
Classifies SKU for lifecycle failures. |
copilotAgentSession.ts |
Classifies SKU for instruction collection. |
copilotAgent.ts |
Removes the global GDPR declaration. |
agentService.ts |
Classifies SKU for legacy migration. |
agentSdkDownloadTelemetry.ts |
Classifies SKU for SDK downloads. |
agentHostTelemetryReporter.ts |
Defines and applies reusable fragments. |
agentHostSessionOpenTelemetry.ts |
Classifies SKU for subscriptions. |
agentHostChangesetTelemetry.ts |
Classifies SKU for changesets. |
code-no-telemetry-common-property.ts |
Reserves the SKU property. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Allow common telemetry properties to be removed so account transitions clear the previous SKU before resolving the current account. Classify the same injected property on forwarded Copilot SDK event schemas. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Name the common initiator and Copilot SKU schema composition and use event-specific aliases when enriching generic telemetry types. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Classify SKU context on Agent Host edit attribution and unhandled error events. Add regression coverage for authentication transitions, stale SKU resolution, and restricted envelope clearing. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Aaron Munger (amunger)
marked this pull request as ready for review
September 1, 2026 21:19
roblourens
approved these changes
Sep 1, 2026
Aaron Munger (amunger)
deleted the
agentHost/copilot-sku-telemetry-schema
branch
September 1, 2026 22:17
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.

What is changing
Agent Host events that receive the dynamically registered
copilotSkucommon property now declare it in their event and GDPR schemas. This keeps those events in their classified ingestion tables instead of routing rows carrying the SKU toRawEventsVSCodeUnclassified.The property remains optional because it is unavailable before account discovery, while signed out, and for configurations that do not resolve a Copilot SKU.
How it works
copilotSku.__GDPR__COMMON__declaration, which conflicts with the new per-event schemas during telemetry extraction.setCommonProperty; event payloads do not manually include the SKU.copilotSkuin the telemetry common-property lint rule to prevent accidental payload duplication.Telemetry extraction succeeds and confirms
copilotskuon all applicable Agent Host schemas, including edit attribution, unhandled errors, and forwarded Copilot SDK events. The client-side startup and outer-process failure events remain excluded because they do not use the SKU-enriched Agent Host telemetry service.Full client type checking is currently blocked by unrelated Copilot and Claude SDK API mismatches in the checkout.