@@ -15,6 +15,7 @@ import { traceWarn } from '../../common/logging';
1515import { StopWatch } from '../../common/stopWatch' ;
1616import { EventNames } from '../../common/telemetry/constants' ;
1717import { classifyError , isTimeoutErrorType } from '../../common/telemetry/errorClassifier' ;
18+ import { getKnownManagerId } from '../../common/telemetry/helpers' ;
1819import { sendTelemetryEvent } from '../../common/telemetry/sender' ;
1920import {
2021 EnvironmentToolSupport ,
@@ -143,7 +144,7 @@ export class InternalEnvironmentManager implements EnvironmentManager {
143144 const envs = await this . manager . getEnvironments ( 'all' ) . catch ( ( ) => [ ] ) ;
144145 const duration = sw . elapsedTime ;
145146 sendTelemetryEvent ( EventNames . ENVIRONMENT_DISCOVERY , duration , {
146- managerId : this . id ,
147+ managerId : getKnownManagerId ( this . id ) ,
147148 result : 'success' ,
148149 envCount : envs . length ,
149150 } ) ;
@@ -162,7 +163,7 @@ export class InternalEnvironmentManager implements EnvironmentManager {
162163 EventNames . ENVIRONMENT_DISCOVERY ,
163164 duration ,
164165 {
165- managerId : this . id ,
166+ managerId : getKnownManagerId ( this . id ) ,
166167 result : errorType === 'canceled' || isTimeoutErrorType ( errorType ) ? 'timeout' : 'error' ,
167168 errorType,
168169 } ,
@@ -323,21 +324,21 @@ export class InternalPackageManager implements PackageManager {
323324 try {
324325 await this . manager . manage ( environment , options ) ;
325326 sendTelemetryEvent ( EventNames . PACKAGE_MANAGEMENT , stopWatch . elapsedTime , {
326- managerId : this . id ,
327+ managerId : getKnownManagerId ( this . id ) ,
327328 result : 'success' ,
328329 triggerSource,
329330 } ) ;
330331 } catch ( error ) {
331332 if ( error instanceof CancellationError ) {
332333 sendTelemetryEvent ( EventNames . PACKAGE_MANAGEMENT , stopWatch . elapsedTime , {
333- managerId : this . id ,
334+ managerId : getKnownManagerId ( this . id ) ,
334335 result : 'cancelled' ,
335336 triggerSource,
336337 } ) ;
337338 throw error ;
338339 }
339340 sendTelemetryEvent ( EventNames . PACKAGE_MANAGEMENT , stopWatch . elapsedTime , {
340- managerId : this . id ,
341+ managerId : getKnownManagerId ( this . id ) ,
341342 result : 'error' ,
342343 errorType : error instanceof Error ? error . name : 'unknown' ,
343344 triggerSource,
0 commit comments