From ec0a7a29d3c1775e0dbb246490280bff333bce66 Mon Sep 17 00:00:00 2001 From: Charles Gagnon Date: Fri, 7 Feb 2020 14:43:03 -0800 Subject: [PATCH] Remove quality checks for events (#8934) * Remove quality checks for events * Update iKey * Add missed quality check --- build/lib/stats.js | 2 +- build/lib/stats.ts | 2 +- extensions/sql-database-projects/package.json | 2 +- .../sharedProcess/sharedProcessMain.ts | 2 +- src/vs/code/node/cliProcessMain.ts | 2 +- .../telemetry/node/commonProperties.ts | 24 +++------- .../node/workbenchCommonProperties.ts | 47 ++++++------------- 7 files changed, 25 insertions(+), 56 deletions(-) diff --git a/build/lib/stats.js b/build/lib/stats.js index 55a47159cb..121a3acf7a 100644 --- a/build/lib/stats.js +++ b/build/lib/stats.js @@ -116,7 +116,7 @@ function submitAllStats(productJson, commit) { } */ appInsights.defaultClient.trackEvent({ - name: `${productJson.quality !== 'stable' ? 'adsworkbench' : 'monacoworkbench'}/packagemetrics`, + name: 'adsworkbench/packagemetrics', properties: { commit, size: JSON.stringify(sizes), count: JSON.stringify(counts) } }); appInsights.defaultClient.flush({ diff --git a/build/lib/stats.ts b/build/lib/stats.ts index 10ff56dd17..9d61de3811 100644 --- a/build/lib/stats.ts +++ b/build/lib/stats.ts @@ -126,7 +126,7 @@ export function submitAllStats(productJson: any, commit: string): Promise { const services = new ServiceCollection(); diff --git a/src/vs/platform/telemetry/node/commonProperties.ts b/src/vs/platform/telemetry/node/commonProperties.ts index 0aab67d1c1..5ee9155cdd 100644 --- a/src/vs/platform/telemetry/node/commonProperties.ts +++ b/src/vs/platform/telemetry/node/commonProperties.ts @@ -20,24 +20,12 @@ export async function resolveCommonProperties( product?: string ): Promise<{ [name: string]: string | boolean | undefined; }> { const result: { [name: string]: string | boolean | undefined; } = Object.create(null); - // {{SQL CARBON EDIT}} start - if (productObject.quality !== 'stable') { - // __GDPR__COMMON__ "common.machineId" : { "endPoint": "MacAddressHash", "classification": "EndUserPseudonymizedInformation", "purpose": "FeatureInsight" } - result['common.machineId'] = machineId; - // __GDPR__COMMON__ "sessionID" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } - result['sessionID'] = uuid.generateUuid() + Date.now(); - // __GDPR__COMMON__ "commitHash" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" } - result['commitHash'] = commit; - } else { - // __GDPR__COMMON__ "common.machineId" : { "endPoint": "MacAddressHash", "classification": "EndUserPseudonymizedInformation", "purpose": "FeatureInsight" } - // result['common.machineId'] = machineId; - result['common.machineId'] = ''; - // // __GDPR__COMMON__ "sessionID" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } - // result['sessionID'] = uuid.generateUuid() + Date.now(); - result['sessionID'] = ''; - // __GDPR__COMMON__ "commitHash" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } - result['commitHash'] = ''; - } // {{SQL CARBON EDIT}} end + // __GDPR__COMMON__ "common.machineId" : { "endPoint": "MacAddressHash", "classification": "EndUserPseudonymizedInformation", "purpose": "FeatureInsight" } + result['common.machineId'] = machineId; + // __GDPR__COMMON__ "sessionID" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + result['sessionID'] = uuid.generateUuid() + Date.now(); + // __GDPR__COMMON__ "commitHash" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" } + result['commitHash'] = commit; // __GDPR__COMMON__ "version" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } result['version'] = version; // __GDPR__COMMON__ "common.platformVersion" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } diff --git a/src/vs/platform/telemetry/node/workbenchCommonProperties.ts b/src/vs/platform/telemetry/node/workbenchCommonProperties.ts index b60e49cee6..2f6b9131ae 100644 --- a/src/vs/platform/telemetry/node/workbenchCommonProperties.ts +++ b/src/vs/platform/telemetry/node/workbenchCommonProperties.ts @@ -24,39 +24,20 @@ export async function resolveWorkbenchCommonProperties( const firstSessionDate = storageService.get(firstSessionDateStorageKey, StorageScope.GLOBAL)!; const lastSessionDate = storageService.get(lastSessionDateStorageKey, StorageScope.GLOBAL)!; - if (product.quality !== 'stable') { - // __GDPR__COMMON__ "common.version.shell" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" } - result['common.version.shell'] = process.versions && process.versions['electron']; - // __GDPR__COMMON__ "common.version.renderer" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" } - result['common.version.renderer'] = process.versions && process.versions['chrome']; - // __GDPR__COMMON__ "common.firstSessionDate" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } - result['common.firstSessionDate'] = firstSessionDate; - // __GDPR__COMMON__ "common.lastSessionDate" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } - result['common.lastSessionDate'] = lastSessionDate || ''; - // __GDPR__COMMON__ "common.isNewSession" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } - result['common.isNewSession'] = !lastSessionDate ? '1' : '0'; - // __GDPR__COMMON__ "common.instanceId" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } - result['common.instanceId'] = instanceId; - // __GDPR__COMMON__ "common.remoteAuthority" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" } - result['common.remoteAuthority'] = cleanRemoteAuthority(remoteAuthority); - } else { - // __GDPR__COMMON__ "common.version.shell" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" } - // result['common.version.shell'] = process.versions && process.versions['electron']; - // __GDPR__COMMON__ "common.version.renderer" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" } - // result['common.version.renderer'] = process.versions && process.versions['chrome']; - // __GDPR__COMMON__ "common.firstSessionDate" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } - // result['common.firstSessionDate'] = firstSessionDate; - // __GDPR__COMMON__ "common.lastSessionDate" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } - // result['common.lastSessionDate'] = lastSessionDate || ''; - // __GDPR__COMMON__ "common.isNewSession" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } - // result['common.isNewSession'] = !lastSessionDate ? '1' : '0'; - // __GDPR__COMMON__ "common.instanceId" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } - // result['common.instanceId'] = instanceId; - // __GDPR__COMMON__ "common.remoteAuthority" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" } - // result['common.remoteAuthority'] = cleanRemoteAuthority(remoteAuthority); - - result['common.userId'] = ''; // {{SQL CARBON EDIT}} - } + // __GDPR__COMMON__ "common.version.shell" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" } + result['common.version.shell'] = process.versions && process.versions['electron']; + // __GDPR__COMMON__ "common.version.renderer" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" } + result['common.version.renderer'] = process.versions && process.versions['chrome']; + // __GDPR__COMMON__ "common.firstSessionDate" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + result['common.firstSessionDate'] = firstSessionDate; + // __GDPR__COMMON__ "common.lastSessionDate" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + result['common.lastSessionDate'] = lastSessionDate || ''; + // __GDPR__COMMON__ "common.isNewSession" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + result['common.isNewSession'] = !lastSessionDate ? '1' : '0'; + // __GDPR__COMMON__ "common.instanceId" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + result['common.instanceId'] = instanceId; + // __GDPR__COMMON__ "common.remoteAuthority" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" } + result['common.remoteAuthority'] = cleanRemoteAuthority(remoteAuthority); result['common.application.name'] = product.nameLong; // {{SQL CARBON EDIT}} setUsageDates(storageService);