microsoft/vscode-react-native
Publicmirrored from https://github.com/microsoft/vscode-react-nativeAvailable
src/typings/vscode-extension-telemetry/vscode-extension-telemetry.d.ts
36lines · modecode
| 1 | declare module "vscode-extension-telemetry" { |
| 2 | export default class TelemetryReporter { |
| 3 | private extensionId; |
| 4 | private extensionVersion; |
| 5 | private appInsightsClient; |
| 6 | private commonProperties; |
| 7 | private static SQM_KEY; |
| 8 | private static REGISTRY_USERID_VALUE; |
| 9 | private static REGISTRY_MACHINEID_VALUE; |
| 10 | |
| 11 | /** |
| 12 | * Constructs a new telemetry reporter |
| 13 | * @param {string} extensionId All events will be prefixed with this event name |
| 14 | * @param {string} extensionVersion Extension version to be reported with each event |
| 15 | * @param {string} key The application insights key |
| 16 | */ |
| 17 | constructor(extensionId: string, extensionVersion: string, key: string); |
| 18 | private setupAIClient(client); |
| 19 | private loadVSCodeCommonProperties(machineId, sessionId, version); |
| 20 | private loadCommonProperties(); |
| 21 | private addCommonProperties(properties); |
| 22 | private getWinRegKeyData(key, name, hive, callback); |
| 23 | |
| 24 | /** |
| 25 | * Sends a telemetry event |
| 26 | * @param {string} eventName The event name |
| 27 | * @param {object} properties An associative array of strings |
| 28 | * @param {object} measures An associative array of numbers |
| 29 | */ |
| 30 | sendTelemetryEvent(eventName: string, properties?: { |
| 31 | [key: string]: string; |
| 32 | }, measures?: { |
| 33 | [key: string]: number; |
| 34 | }): void; |
| 35 | } |
| 36 | } |
| 37 | |