This commit is contained in:
Matt Bierner 2020-01-17 14:32:11 -08:00
parent 5335a721fa
commit 8714526077

View file

@ -30,22 +30,20 @@ export class VSCodeTelemetryReporter implements TelemetryReporter {
private readonly clientVersionDelegate: () => string
) { }
public logTelemetry(eventName: string, properties?: { [prop: string]: string }) {
public logTelemetry(eventName: string, properties: { [prop: string]: string } = {}) {
const reporter = this.reporter;
if (reporter) {
if (!properties) {
properties = {};
}
/* __GDPR__FRAGMENT__
"TypeScriptCommonProperties" : {
"version" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }
}
*/
properties['version'] = this.clientVersionDelegate();
reporter.sendTelemetryEvent(eventName, properties);
if (!reporter) {
return;
}
/* __GDPR__FRAGMENT__
"TypeScriptCommonProperties" : {
"version" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }
}
*/
properties['version'] = this.clientVersionDelegate();
reporter.sendTelemetryEvent(eventName, properties);
}
public dispose() {