forked from microsoft/vscode-go
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add telemetry support for the Go extension
- Loading branch information
1 parent
2cc981c
commit 2328f31
Showing
4 changed files
with
60 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
declare module "vscode-extension-telemetry" { | ||
export default class TelemetryReporter { | ||
private extensionId; | ||
private extensionVersion; | ||
private appInsightsClient; | ||
private commonProperties; | ||
private static SQM_KEY; | ||
private static REGISTRY_USERID_VALUE; | ||
private static REGISTRY_MACHINEID_VALUE; | ||
|
||
/** | ||
* Constructs a new telemetry reporter | ||
* @param {string} extensionId All events will be prefixed with this event name | ||
* @param {string} extensionVersion Extension version to be reported with each event | ||
* @param {string} key The application insights key | ||
*/ | ||
constructor(extensionId: string, extensionVersion: string, key: string); | ||
private setupAIClient(client); | ||
private loadVSCodeCommonProperties(machineId, sessionId, version); | ||
private loadCommonProperties(); | ||
private addCommonProperties(properties); | ||
private getWinRegKeyData(key, name, hive, callback); | ||
|
||
/** | ||
* Sends a telemetry event | ||
* @param {string} eventName The event name | ||
* @param {object} properties An associative array of strings | ||
* @param {object} measures An associative array of numbers | ||
*/ | ||
sendTelemetryEvent(eventName: string, properties?: { | ||
[key: string]: string; | ||
}, measures?: { | ||
[key: string]: number; | ||
}): void; | ||
} | ||
} |