Skip to content

chat: redact remote session type telemetry#316731

Draft
roblourens wants to merge 1 commit into
mainfrom
agents/find-the-interactivesessionproviderinvoked-event-bc9305da
Draft

chat: redact remote session type telemetry#316731
roblourens wants to merge 1 commit into
mainfrom
agents/find-the-interactivesessionproviderinvoked-event-bc9305da

Conversation

@roblourens
Copy link
Copy Markdown
Member

This changes interactiveSessionProviderInvoked telemetry so chat session schemes beginning with remote- are reported as remote-agent-host instead 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-native
  • npm run valid-layers-check
  • node --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)

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>
Copilot AI review requested due to automatic review settings May 15, 2026 23:35
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 getChatSessionTypeForTelemetry helper that maps remote-* schemes to remote-agent-host and use it in ChatRequestTelemetry.
  • Update the GDPR sessionType comment to reflect the redaction behavior.
  • Add a unit test verifying the redaction, plus stubbing of ILanguageModelsService in 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants