@@ -16,6 +16,7 @@ import {
1616 PackageManagerAlreadyRegisteredError ,
1717} from '../common/errors/AlreadyRegisteredError' ;
1818import { traceError , traceVerbose } from '../common/logging' ;
19+ import { StopWatch } from '../common/stopWatch' ;
1920import { EventNames } from '../common/telemetry/constants' ;
2021import { sendTelemetryEvent } from '../common/telemetry/sender' ;
2122import { getCallingExtension } from '../common/utils/frameUtils' ;
@@ -71,6 +72,7 @@ export class PythonEnvironmentManagers implements EnvironmentManagers {
7172 constructor ( private readonly pm : PythonProjectManager ) { }
7273
7374 public registerEnvironmentManager ( manager : EnvironmentManager ) : Disposable {
75+ const registrationStopWatch = new StopWatch ( ) ;
7476 const managerId = generateId ( manager . name ) ;
7577 if ( this . _environmentManagers . has ( managerId ) ) {
7678 const ex = new EnvironmentManagerAlreadyRegisteredError (
@@ -105,7 +107,7 @@ export class PythonEnvironmentManagers implements EnvironmentManagers {
105107 this . _onDidChangeEnvironmentManager . fire ( { kind : 'registered' , manager : mgr } ) ;
106108
107109 if ( ! managerId . toLowerCase ( ) . startsWith ( 'undefined_publisher.' ) ) {
108- sendTelemetryEvent ( EventNames . ENVIRONMENT_MANAGER_REGISTERED , undefined , {
110+ sendTelemetryEvent ( EventNames . ENVIRONMENT_MANAGER_REGISTERED , registrationStopWatch . elapsedTime , {
109111 managerId,
110112 } ) ;
111113 }
0 commit comments