microsoft/vscode-react-native

Public

mirrored from https://github.com/microsoft/vscode-react-nativeAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
dev/v-peq/upgradeTypeScriptTo7

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

src/typings/vscode-extension-telemetry/vscode-extension-telemetry.d.ts

40lines · modecode

1declare 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(
31 eventName: string,
32 properties?: {
33 [key: string]: string;
34 },
35 measures?: {
36 [key: string]: number;
37 },
38 ): void;
39 }
40}
41