Skip to content

Conversation

@dmitrivMS
Copy link
Contributor

@dmitrivMS dmitrivMS commented Dec 24, 2025

Fixes #167156

Used IProductService to propagate remote authority config. Collapsed some parameters in places where IProductService is being passed and added unit-tests.

The hard-coded list was:
'ssh-remote', 'dev-container', 'attached-container', 'wsl', 'tunnel', 'codespaces', 'amlext'

The new list (as per product.json) would be:
'ssh-remote', 'dev-container', 'attached-container', 'wsl', 'tunnel', 'codespaces', 'amlext', 'vscode-vfs'

All of these but last one come from remoteExtensionTips with amlext added in separate PR.
vscode-vfs comes from virtualWorkspaceExtensionTips. This was added by Copilot and it seems relevant (it is for Remote Repositories, or ms-vscode.remote-repositories extension). If this is incorrect, I can remove it.

Copilot AI review requested due to automatic review settings December 24, 2025 09:02
@dmitrivMS dmitrivMS self-assigned this Dec 24, 2025
@dmitrivMS dmitrivMS added the telemetry Telemetry system issues label Dec 24, 2025
Copy link
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

This PR refactors the telemetry system to use remote authority names from product configuration (remoteExtensionTips and virtualWorkspaceExtensionTips) instead of a hardcoded list. This addresses issue #167156 by making the list of recognized remote names configurable through product.json.

Key Changes:

  • Modified cleanRemoteAuthority to accept product configuration and check remote authority names dynamically against remoteExtensionTips and virtualWorkspaceExtensionTips
  • Updated resolveWorkbenchCommonProperties functions to accept IProductService instead of individual product properties
  • Added remoteExtensionTips and virtualWorkspaceExtensionTips to IExtensionHostInitData for extension host telemetry

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
src/vs/platform/telemetry/common/telemetryUtils.ts Refactored cleanRemoteAuthority to accept IProductRemoteConfig and check authority names against product configuration instead of hardcoded set
src/vs/workbench/services/telemetry/common/workbenchCommonProperties.ts Updated function signature to accept IProductService and extract properties from it; passes product service to cleanRemoteAuthority
src/vs/workbench/services/telemetry/browser/workbenchCommonProperties.ts Updated function signature to accept IProductService and extract properties from it; passes product service to cleanRemoteAuthority
src/vs/workbench/services/telemetry/electron-browser/telemetryService.ts Updated call to resolveWorkbenchCommonProperties to pass productService as first parameter
src/vs/workbench/services/telemetry/browser/telemetryService.ts Updated call to resolveWorkbenchCommonProperties to pass productService and removed individual property parameters
src/vs/workbench/services/extensions/common/extensionHostProtocol.ts Added remoteExtensionTips and virtualWorkspaceExtensionTips properties to IExtensionHostInitData
src/vs/workbench/services/extensions/electron-browser/localProcessExtensionHost.ts Added initialization of new remote tips properties from product service
src/vs/workbench/services/extensions/common/remoteExtensionHost.ts Added initialization of new remote tips properties from product service
src/vs/workbench/services/extensions/browser/webWorkerExtensionHost.ts Added initialization of new remote tips properties from product service
src/vs/workbench/api/common/extHostTelemetry.ts Updated call to cleanRemoteAuthority to pass initData as product config
src/vs/workbench/contrib/debug/common/debugger.ts Added IProductService injection and updated cleanRemoteAuthority call to pass product service
src/vs/workbench/contrib/debug/test/node/debugger.test.ts Updated test constructor call to include additional undefined! parameter for new product service injection
src/vs/workbench/services/telemetry/test/node/commonProperties.test.ts Updated test calls to pass undefined! for product service and removed unused local variables
src/vs/workbench/services/telemetry/test/browser/commonProperties.test.ts Updated test calls to pass undefined! for product service and removed unused local variables

dmitrivMS and others added 2 commits December 24, 2025 01:15
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@dmitrivMS dmitrivMS requested a review from lramos15 December 24, 2025 09:42
@dmitrivMS dmitrivMS marked this pull request as ready for review December 24, 2025 09:42
@dmitrivMS dmitrivMS added this to the December / January 2026 milestone Dec 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

telemetry Telemetry system issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Telemetry: Avoid hardcoding remote authority names

2 participants