import { TelemetryService } from '@salesforce/salesforcedx-utils-vscode/out/src' ; import { JsonMap } from '@salesforce/ts-types' ; import * as vscode from 'vscode' ; export const telemetryService = TelemetryService . getInstance ( ) ; export async function startTelemetry ( context , hrtime ) { const extensionPackage = require ( '../../package.json' ) ; await telemetryService . initializeService ( context , extensionPackage . name , extensionPackage . aiKey , extensionPackage . version ) ; telemetryService . sendExtensionActivationEvent ( hrtime ) ; } export async function stopTelemetry ( ) { telemetryService . sendExtensionDeactivationEvent ( ) ; } export interface TelemetryModelJson extends JsonMap { fields : number ; orderBy : number ; limit : number ; errors : number ; unsupported : number ; }