Forward CAPI assignment context to core telemetry via internal command#327375
Open
jul-stevenson wants to merge 2 commits into
Open
Forward CAPI assignment context to core telemetry via internal command#327375jul-stevenson wants to merge 2 commits into
jul-stevenson wants to merge 2 commits into
Conversation
Register a private '_telemetry.setExperimentProperty' command in the workbench that calls ITelemetryService.setExperimentProperty(). The Copilot extension calls this command when it receives CAPI flight assignments, so they appear on all core telemetry events from the current window (same scope as TAS abexp.assignmentcontext). Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Forwards Copilot CAPI flight assignments into core VS Code telemetry.
Changes:
- Registers an internal telemetry command.
- Forwards assignment context from both Copilot telemetry paths.
- Extends the chat library telemetry sender interface.
Show a summary per file
| File | Description |
|---|---|
mainThreadTelemetry.ts |
Registers the core telemetry bridge. |
telemetryServiceImpl.ts |
Invokes the bridge for CAPI assignments. |
chatLibMain.ts |
Propagates assignments through chat library senders. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 1
- Review effort level: Medium
Comment on lines
+63
to
+64
| CommandsRegistry.registerCommand('_telemetry.setExperimentProperty', function (accessor, name: string, value: string) { | ||
| accessor.get(ITelemetryService).setExperimentProperty(name, value); |
Contributor
Author
There was a problem hiding this comment.
Fixed in bdfa0cf. I replaced the generic command with a narrowed _telemetry.setCapiAssignmentContext command, hard-coded the telemetry property name to capi.assignmentcontext, and added format/size validation (key:value entries separated by ;, control chars rejected, capped at 8KB) before calling setExperimentProperty. The Copilot side now only sends the assignment-context value to this narrowed command.
- Replace generic _telemetry.setExperimentProperty bridge with _telemetry.setCapiAssignmentContext - Hardcode capi.assignmentcontext as the only settable property - Validate assignment-context format and size before trusting input - Update Copilot forwarding call to use the narrowed command Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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.
New functionality related to issue reported in issue https://github.com/microsoft/vscode-internalbacklog/issues/5964#issuecomment-4127382406
Register a private
_telemetry.setExperimentPropertycommand in the workbench that calls ITelemetryService.setExperimentProperty(). The Copilot extension calls this command when it receives CAPI flight assignments, so they appear on all core telemetry events from the current window (same scope asabexp.assignmentcontext).Validation:
Manual validation done via examining raw telemetry