chat: redact remote session type telemetry#316731
Draft
roblourens wants to merge 1 commit into
Draft
Conversation
Report remote chat session schemes as remote-agent-host in interactiveSessionProviderInvoked telemetry instead of sending the full remote-* scheme. (Written by Copilot) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Redacts remote chat session schemes from the interactiveSessionProviderInvoked telemetry event by reporting any scheme starting with remote- as the constant remote-agent-host, preventing potentially-identifying remote session type strings from being sent. Includes a regression test and a corresponding update to the telemetry GDPR comment.
Changes:
- Add
getChatSessionTypeForTelemetryhelper that mapsremote-*schemes toremote-agent-hostand use it inChatRequestTelemetry. - Update the GDPR
sessionTypecomment to reflect the redaction behavior. - Add a unit test verifying the redaction, plus stubbing of
ILanguageModelsServicein the shared test setup.
Show a summary per file
| File | Description |
|---|---|
| src/vs/workbench/contrib/chat/common/chatService/chatServiceTelemetry.ts | Introduces telemetry-side helper that redacts remote scheme to remote-agent-host; updates classification comment. |
| src/vs/workbench/contrib/chat/test/common/chatService/chatService.test.ts | Adds regression test for redaction and stubs ILanguageModelsService with NullLanguageModelsService in test setup. |
Copilot's findings
- Files reviewed: 2/2 changed files
- Comments generated: 0
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 changes
interactiveSessionProviderInvokedtelemetry so chat session schemes beginning withremote-are reported asremote-agent-hostinstead of sending the full remote session type.A regression test covers sending a request on a
remote-*session resource and verifies the telemetry payload.Validation:
npm run compile-check-ts-nativenpm run valid-layers-checknode --experimental-strip-types build/hygiene.ts src/vs/workbench/contrib/chat/common/chatService/chatServiceTelemetry.ts src/vs/workbench/contrib/chat/test/common/chatService/chatService.test.ts./scripts/test.sh --run src/vs/workbench/contrib/chat/test/common/chatService/chatService.test.ts --grep "sendRequest redacts remote session type in provider invoked telemetry"(Written by Copilot)