@@ -10,6 +10,7 @@ import { URI } from 'vs/base/common/uri';
10
10
import { ConfigurationTarget , ConfigurationTargetToString , IConfigurationService } from 'vs/platform/configuration/common/configuration' ;
11
11
import { IEnvironmentService } from 'vs/platform/environment/common/environment' ;
12
12
import { IProductService } from 'vs/platform/product/common/productService' ;
13
+ import { getRemoteName } from 'vs/platform/remote/common/remoteHosts' ;
13
14
import { verifyMicrosoftInternalDomain } from 'vs/platform/telemetry/common/commonProperties' ;
14
15
import { ClassifiedEvent , IGDPRProperty , OmitMetadata , StrictPropertyCheck } from 'vs/platform/telemetry/common/gdprTypings' ;
15
16
import { ICustomEndpointTelemetryService , ITelemetryData , ITelemetryEndpoint , ITelemetryInfo , ITelemetryService , TelemetryConfiguration , TelemetryLevel , TELEMETRY_OLD_SETTING_ID , TELEMETRY_SETTING_ID } from 'vs/platform/telemetry/common/telemetry' ;
@@ -227,20 +228,14 @@ export function validateTelemetryData(data?: any): { properties: Properties; mea
227
228
} ;
228
229
}
229
230
230
- const telemetryAllowedAuthorities : readonly string [ ] = [ 'ssh-remote' , 'dev-container' , 'attached-container' , 'wsl' , 'tunneling ' , 'codespaces' ] ;
231
+ const telemetryAllowedAuthorities = new Set ( [ 'ssh-remote' , 'dev-container' , 'attached-container' , 'wsl' , 'tunnel ' , 'codespaces' ] ) ;
231
232
232
233
export function cleanRemoteAuthority ( remoteAuthority ?: string ) : string {
233
234
if ( ! remoteAuthority ) {
234
235
return 'none' ;
235
236
}
236
-
237
- for ( const authority of telemetryAllowedAuthorities ) {
238
- if ( remoteAuthority . startsWith ( `${ authority } +` ) ) {
239
- return authority ;
240
- }
241
- }
242
-
243
- return 'other' ;
237
+ const remoteName = getRemoteName ( remoteAuthority ) ;
238
+ return telemetryAllowedAuthorities . has ( remoteName ) ? remoteName : 'other' ;
244
239
}
245
240
246
241
function flatten ( obj : any , result : { [ key : string ] : any } , order : number = 0 , prefix ?: string ) : void {
0 commit comments