Annotate common ts telemetry properties

This commit is contained in:
Matt Bierner
2018-05-08 11:41:42 -07:00
parent 15f74515fe
commit f05063d13d
4 changed files with 43 additions and 9 deletions

View File

@@ -33,7 +33,10 @@ class ApplyCodeActionCommand implements Command {
if (action.fixName) {
/* __GDPR__
"quickFix.execute" : {
"fixName" : { "classification": "PublicNonPersonalData", "purpose": "FeatureInsight" }
"fixName" : { "classification": "PublicNonPersonalData", "purpose": "FeatureInsight" },
"${include}": [
"${TypeScriptCommonProperties}"
]
}
*/
this.telemetryReporter.logTelemetry('quickFix.execute', {
@@ -64,8 +67,11 @@ class ApplyFixAllCodeAction implements Command {
if (tsAction.fixName) {
/* __GDPR__
"quickFix.execute" : {
"fixName" : { "classification": "PublicNonPersonalData", "purpose": "FeatureInsight" }
"quickFixAll.execute" : {
"fixName" : { "classification": "PublicNonPersonalData", "purpose": "FeatureInsight" },
"${include}": [
"${TypeScriptCommonProperties}"
]
}
*/
this.telemetryReporter.logTelemetry('quickFixAll.execute', {

View File

@@ -383,7 +383,11 @@ export default class TypeScriptServiceClient implements ITypeScriptServiceClient
this.error('Starting TSServer failed with error.', err);
window.showErrorMessage(localize('serverCouldNotBeStarted', 'TypeScript language server couldn\'t be started. Error message is: {0}', err.message || err));
/* __GDPR__
"error" : {}
"error" : {
"${include}": [
"${TypeScriptCommonProperties}"
]
}
*/
this.logTelemetry('error');
this.resetClientVersion();
@@ -401,7 +405,11 @@ export default class TypeScriptServiceClient implements ITypeScriptServiceClient
this.error(`TSServer log file: ${this.tsServerLogFile}`);
}
/* __GDPR__
"tsserver.error" : {}
"tsserver.error" : {
"${include}": [
"${TypeScriptCommonProperties}"
]
}
*/
this.logTelemetry('tsserver.error');
this.serviceExited(false);
@@ -413,7 +421,10 @@ export default class TypeScriptServiceClient implements ITypeScriptServiceClient
this.error(`TSServer exited with code: ${code}`);
/* __GDPR__
"tsserver.exitWithCode" : {
"code" : { "classification": "CallstackOrException", "purpose": "PerformanceAndHealth" }
"code" : { "classification": "CallstackOrException", "purpose": "PerformanceAndHealth" },
"${include}": [
"${TypeScriptCommonProperties}"
]
}
*/
this.logTelemetry('tsserver.exitWithCode', { code: code });
@@ -567,7 +578,11 @@ export default class TypeScriptServiceClient implements ITypeScriptServiceClient
id: MessageAction.reportIssue
});
/* __GDPR__
"serviceExited" : {}
"serviceExited" : {
"${include}": [
"${TypeScriptCommonProperties}"
]
}
*/
this.logTelemetry('serviceExited');
this.resetClientVersion();
@@ -897,7 +912,10 @@ export default class TypeScriptServiceClient implements ITypeScriptServiceClient
"typingsInstalled" : {
"installedPackages" : { "classification": "PublicNonPersonalData", "purpose": "FeatureInsight" },
"installSuccess": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" },
"typingsInstallerVersion": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }
"typingsInstallerVersion": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" },
"${include}": [
"${TypeScriptCommonProperties}"
]
}
*/
// __GDPR__COMMENT__: Other events are defined by TypeScript.

View File

@@ -57,7 +57,11 @@ class ExcludeHintItem {
this._item.color = '#A5DF3B';
this._item.show();
/* __GDPR__
"js.hintProjectExcludes" : {}
"js.hintProjectExcludes" : {
"${include}": [
"${TypeScriptCommonProperties}"
]
}
*/
this.telemetryReporter.logTelemetry('js.hintProjectExcludes');
}

View File

@@ -33,6 +33,12 @@ export default class TelemetryReporter {
if (!properties) {
properties = {};
}
/* __GDPR__FRAGMENT__
"TypeScriptCommonProperties" : {
"version" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }
}
*/
properties['version'] = this.clientVersionDelegate();
reporter.sendTelemetryEvent(eventName, properties);