diff --git a/extensions/git/src/commands.ts b/extensions/git/src/commands.ts index 7b4c807989d76..660e9f58a1e76 100644 --- a/extensions/git/src/commands.ts +++ b/extensions/git/src/commands.ts @@ -264,6 +264,11 @@ export class CommandCenter { }); if (!url) { + /* __GDPR__ + "clone" : { + "outcome" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ this.telemetryReporter.sendTelemetryEvent('clone', { outcome: 'no_URL' }); return; } @@ -278,6 +283,11 @@ export class CommandCenter { }); if (!parentPath) { + /* __GDPR__ + "clone" : { + "outcome" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ this.telemetryReporter.sendTelemetryEvent('clone', { outcome: 'no_directory' }); return; } @@ -295,14 +305,30 @@ export class CommandCenter { const result = await window.showInformationMessage(localize('proposeopen', "Would you like to open the cloned repository?"), open); const openFolder = result === open; + /* __GDPR__ + "clone" : { + "outcome" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "openFolder": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth", "isMeasurement": true } + } + */ this.telemetryReporter.sendTelemetryEvent('clone', { outcome: 'success' }, { openFolder: openFolder ? 1 : 0 }); if (openFolder) { commands.executeCommand('vscode.openFolder', Uri.file(repositoryPath)); } } catch (err) { if (/already exists and is not an empty directory/.test(err && err.stderr || '')) { + /* __GDPR__ + "clone" : { + "outcome" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ this.telemetryReporter.sendTelemetryEvent('clone', { outcome: 'directory_not_empty' }); } else { + /* __GDPR__ + "clone" : { + "outcome" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ this.telemetryReporter.sendTelemetryEvent('clone', { outcome: 'error' }); } throw err; @@ -1315,6 +1341,11 @@ export class CommandCenter { }); } + /* __GDPR__ + "git.command" : { + "command" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ this.telemetryReporter.sendTelemetryEvent('git.command', { command: id }); return result.catch(async err => { diff --git a/extensions/markdown/src/extension.ts b/extensions/markdown/src/extension.ts index b684f8ad74370..c34f12e44b801 100644 --- a/extensions/markdown/src/extension.ts +++ b/extensions/markdown/src/extension.ts @@ -260,6 +260,12 @@ function showPreview(cspArbiter: ExtensionContentSecurityPolicyArbiter, uri?: vs }); if (telemetryReporter) { + /* __GDPR__ + "openPreview" : { + "where" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "how": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ telemetryReporter.sendTelemetryEvent('openPreview', { where: sideBySide ? 'sideBySide' : 'inPlace', how: (uri instanceof vscode.Uri) ? 'action' : 'pallete' diff --git a/extensions/typescript/src/typescriptServiceClient.ts b/extensions/typescript/src/typescriptServiceClient.ts index 3fe2dde35fd09..bd5936aa22c94 100644 --- a/extensions/typescript/src/typescriptServiceClient.ts +++ b/extensions/typescript/src/typescriptServiceClient.ts @@ -386,6 +386,11 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient this.lastError = err; 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" : { + "message": { "classification": "CustomerContent", "purpose": "PerformanceAndHealth" } + } + */ this.logTelemetry('error', { message: err.message }); return; } @@ -396,6 +401,9 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient if (this.tsServerLogFile) { this.error(`TSServer log file: ${this.tsServerLogFile}`); } + /* __GDPR__ + "tsserver.error" : {} + */ this.logTelemetry('tsserver.error'); this.serviceExited(false); }); @@ -404,6 +412,11 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient this.info(`TSServer exited`); } else { this.error(`TSServer exited with code: ${code}`); + /* __GDPR__ + "tsserver.exitWithCode" : { + "code" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" } + } + */ this.logTelemetry('tsserver.exitWithCode', { code: code }); } @@ -548,6 +561,9 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient id: MessageAction.reportIssue, isCloseAffordance: true }); + /* __GDPR__ + "serviceExited" : {} + */ this.logTelemetry('serviceExited'); } else if (diff < 60 * 1000 /* 1 Minutes */) { this.lastStart = Date.now(); @@ -835,6 +851,14 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient } break; } + /* __GDPR__ + "typingsInstalled" : { + "installedPackages" : { "classification": "PublicNonPersonalData", "purpose": "FeatureInsight" }, + "installSuccess": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, + "typingsInstallerVersion": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" } + } + */ + // __GDPR__COMMENT__: Other events are defined by TypeScript. this.logTelemetry(telemetryData.telemetryEventName, properties); } } diff --git a/extensions/typescript/src/utils/projectStatus.ts b/extensions/typescript/src/utils/projectStatus.ts index ec6cb67c2b52e..ef95074e01bc3 100644 --- a/extensions/typescript/src/utils/projectStatus.ts +++ b/extensions/typescript/src/utils/projectStatus.ts @@ -54,6 +54,9 @@ class ExcludeHintItem { this._item.tooltip = localize('hintExclude.tooltip', "To enable project-wide JavaScript/TypeScript language features, exclude large folders with source files that you do not work on."); this._item.color = '#A5DF3B'; this._item.show(); + /* __GDPR__ + "js.hintProjectExcludes" : {} + */ this._client.logTelemetry('js.hintProjectExcludes'); } } diff --git a/src/typings/native-keymap.d.ts b/src/typings/native-keymap.d.ts index 092191dd75973..716a74e38b8cc 100644 --- a/src/typings/native-keymap.d.ts +++ b/src/typings/native-keymap.d.ts @@ -42,12 +42,28 @@ declare module 'native-keymap' { export function getKeyMap(): IKeyboardMapping; + /* __GDPR__FRAGMENT__ + "IKeyboardLayoutInfo" : { + "name" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "id": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "text": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ export interface IWindowsKeyboardLayoutInfo { name: string; id: string; text: string; } + /* __GDPR__FRAGMENT__ + "IKeyboardLayoutInfo" : { + "model" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "layout": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "variant": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "options": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "rules": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ export interface ILinuxKeyboardLayoutInfo { model: string; layout: string; @@ -56,6 +72,12 @@ declare module 'native-keymap' { rules: string; } + /* __GDPR__FRAGMENT__ + "IKeyboardLayoutInfo" : { + "id" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "lang": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ export interface IMacKeyboardLayoutInfo { id: string; lang: string; diff --git a/src/vs/base/parts/quickopen/browser/quickOpenWidget.ts b/src/vs/base/parts/quickopen/browser/quickOpenWidget.ts index 63d07bf6c35a0..15e75b3a9eb11 100644 --- a/src/vs/base/parts/quickopen/browser/quickOpenWidget.ts +++ b/src/vs/base/parts/quickopen/browser/quickOpenWidget.ts @@ -532,6 +532,13 @@ export class QuickOpenWidget implements IModelProvider { if (this.usageLogger) { const indexOfAcceptedElement = this.model.entries.indexOf(value); const entriesCount = this.model.entries.length; + /* __GDPR__ + "quickOpenWidgetItemAccepted" : { + "index" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "count": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "isQuickNavigate": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ this.usageLogger.publicLog('quickOpenWidgetItemAccepted', { index: indexOfAcceptedElement, count: entriesCount, isQuickNavigate: this.quickNavigateConfiguration ? true : false }); } @@ -773,6 +780,12 @@ export class QuickOpenWidget implements IModelProvider { if (this.model) { const entriesCount = this.model.entries.filter(e => this.isElementVisible(this.model, e)).length; if (this.usageLogger) { + /* __GDPR__ + "quickOpenWidgetCancelled" : { + "count" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "isQuickNavigate": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ this.usageLogger.publicLog('quickOpenWidgetCancelled', { count: entriesCount, isQuickNavigate: this.quickNavigateConfiguration ? true : false }); } } diff --git a/src/vs/base/parts/quickopen/common/quickOpen.ts b/src/vs/base/parts/quickopen/common/quickOpen.ts index 2d16a04306089..1efef91896c08 100644 --- a/src/vs/base/parts/quickopen/common/quickOpen.ts +++ b/src/vs/base/parts/quickopen/common/quickOpen.ts @@ -6,6 +6,11 @@ import { ResolvedKeybinding } from 'vs/base/common/keyCodes'; +/* __GDPR__FRAGMENT__ + "IQuickNavigateConfiguration" : { + "keybindings" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } +*/ export interface IQuickNavigateConfiguration { keybindings: ResolvedKeybinding[]; } diff --git a/src/vs/code/electron-browser/sharedProcessMain.ts b/src/vs/code/electron-browser/sharedProcessMain.ts index f83a1b2669e68..67faa28623e15 100644 --- a/src/vs/code/electron-browser/sharedProcessMain.ts +++ b/src/vs/code/electron-browser/sharedProcessMain.ts @@ -109,6 +109,7 @@ function main(server: Server, initData: ISharedProcessInitData): void { const config: ITelemetryServiceConfig = { appender, commonProperties: resolveCommonProperties(product.commit, pkg.version, installSource) + // __GDPR__COMMON__ "common.machineId" : { "classification": "EndUserPseudonymizedInformation", "purpose": "FeatureInsight" } .then(result => Object.defineProperty(result, 'common.machineId', { get: () => storageService.get(machineIdStorageKey), enumerable: true diff --git a/src/vs/code/electron-main/app.ts b/src/vs/code/electron-main/app.ts index df39afe3f61b0..543a63052299d 100644 --- a/src/vs/code/electron-main/app.ts +++ b/src/vs/code/electron-main/app.ts @@ -295,6 +295,7 @@ export class CodeApplication { const channel = getDelayedChannel(this.sharedProcessClient.then(c => c.getChannel('telemetryAppender'))); const appender = new TelemetryAppenderClient(channel); const commonProperties = resolveCommonProperties(product.commit, pkg.version, this.environmentService.installSource) + // __GDPR__COMMON__ "common.machineId" : { "classification": "EndUserPseudonymizedInformation", "purpose": "FeatureInsight" } .then(result => Object.defineProperty(result, 'common.machineId', { get: () => this.storageService.getItem(machineIdStorageKey), enumerable: true diff --git a/src/vs/code/electron-main/menus.ts b/src/vs/code/electron-main/menus.ts index b796c7e82cd56..0accad12c7895 100644 --- a/src/vs/code/electron-main/menus.ts +++ b/src/vs/code/electron-main/menus.ts @@ -1239,6 +1239,12 @@ export class CodeMenu { } private reportMenuActionTelemetry(id: string): void { + /* __GDPR__ + "workbencActionExecuted" : { + "id" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "from": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ this.telemetryService.publicLog('workbenchActionExecuted', { id, from: telemetryFrom }); } diff --git a/src/vs/code/electron-main/windows.ts b/src/vs/code/electron-main/windows.ts index 505bc50be4fd7..37d81aaacc83d 100644 --- a/src/vs/code/electron-main/windows.ts +++ b/src/vs/code/electron-main/windows.ts @@ -1572,6 +1572,7 @@ class FileDialog { // Telemetry if (options.telemetryEventName) { + // __GDPR__TODO__ Dynamic event names and dynamic properties. Can not be registered statically. this.telemetryService.publicLog(options.telemetryEventName, { ...options.telemetryExtraData, outcome: numberOfPaths ? 'success' : 'canceled', diff --git a/src/vs/editor/common/commonCodeEditor.ts b/src/vs/editor/common/commonCodeEditor.ts index 56a286d4baf93..2c38ec938d230 100644 --- a/src/vs/editor/common/commonCodeEditor.ts +++ b/src/vs/editor/common/commonCodeEditor.ts @@ -1004,6 +1004,9 @@ export abstract class CommonCodeEditor extends Disposable implements editorCommo protected abstract _removeDecorationType(key: string): void; protected abstract _resolveDecorationOptions(typeKey: string, writable: boolean): editorCommon.IModelDecorationOptions; + /* __GDPR__FRAGMENT__ + "EditorTelemetryData" : {} + */ public getTelemetryData(): { [key: string]: any; } { return null; } diff --git a/src/vs/editor/common/editorCommonExtensions.ts b/src/vs/editor/common/editorCommonExtensions.ts index 7fc3fda9ce2b2..fee9cdfbd3a8f 100644 --- a/src/vs/editor/common/editorCommonExtensions.ts +++ b/src/vs/editor/common/editorCommonExtensions.ts @@ -194,6 +194,15 @@ export abstract class EditorAction extends EditorCommand { } protected reportTelemetry(accessor: ServicesAccessor, editor: editorCommon.ICommonCodeEditor) { + /* __GDPR__ + "editorActionInvoked" : { + "name" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "id": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "${include}": [ + "${EditorTelemetryData}" + ] + } + */ accessor.get(ITelemetryService).publicLog('editorActionInvoked', { name: this.label, id: this.id, ...editor.getTelemetryData() }); } diff --git a/src/vs/editor/contrib/gotoError/browser/gotoError.ts b/src/vs/editor/contrib/gotoError/browser/gotoError.ts index 70077a344ca29..8b6111b2c13d5 100644 --- a/src/vs/editor/contrib/gotoError/browser/gotoError.ts +++ b/src/vs/editor/contrib/gotoError/browser/gotoError.ts @@ -406,6 +406,14 @@ class MarkerNavigationAction extends EditorAction { } let model = controller.getOrCreateModel(); + /* __GDPR__ + "zoneWidgetShown" : { + "mode" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "${include}": [ + "${EditorTelemetryData}" + ] + } + */ telemetryService.publicLog('zoneWidgetShown', { mode: 'go to error', ...editor.getTelemetryData() }); if (model) { if (this._isNext) { diff --git a/src/vs/editor/contrib/referenceSearch/browser/referencesController.ts b/src/vs/editor/contrib/referenceSearch/browser/referencesController.ts index cf8da0f92a7c1..d268a392aff1e 100644 --- a/src/vs/editor/contrib/referenceSearch/browser/referencesController.ts +++ b/src/vs/editor/contrib/referenceSearch/browser/referencesController.ts @@ -161,6 +161,12 @@ export class ReferencesController implements editorCommon.IEditorContribution { const startTime = Date.now(); this._disposables.push({ dispose: () => { + /* __GDPR__ + "zoneWidgetShown" : { + "mode" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "elapsedTime": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ this._telemetryService.publicLog('zoneWidgetShown', { mode: 'reference search', elapsedTime: Date.now() - startTime @@ -191,6 +197,12 @@ export class ReferencesController implements editorCommon.IEditorContribution { const const mode = this._editor.getModel().getLanguageIdentifier().language; + /* __GDPR__ + "findReferences" : { + "durarion" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, + "mode": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ onDone(duration => this._telemetryService.publicLog('findReferences', { duration, mode diff --git a/src/vs/editor/contrib/suggest/browser/completionModel.ts b/src/vs/editor/contrib/suggest/browser/completionModel.ts index 359f66ad1e93b..45ca3b876a920 100644 --- a/src/vs/editor/contrib/suggest/browser/completionModel.ts +++ b/src/vs/editor/contrib/suggest/browser/completionModel.ts @@ -16,6 +16,15 @@ export interface ICompletionItem extends ISuggestionItem { idx?: number; } + +/* __GDPR__FRAGMENT__ + "ICompletionStats" : { + "suggestionCount" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "snippetCount": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "textCount": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } +*/ +// __GDPR__TODO__: This is a dynamically extensible structure which can not be declared statically. export interface ICompletionStats { suggestionCount: number; snippetCount: number; diff --git a/src/vs/editor/contrib/suggest/browser/suggestController.ts b/src/vs/editor/contrib/suggest/browser/suggestController.ts index 6f7fb7e9add33..6ffa21fabcb95 100644 --- a/src/vs/editor/contrib/suggest/browser/suggestController.ts +++ b/src/vs/editor/contrib/suggest/browser/suggestController.ts @@ -197,6 +197,14 @@ export class SuggestController implements IEditorContribution { } this._alertCompletionItem(item); + /* __GDPR__ + "suggestSnippetInsert" : { + "suggestionType" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "${include}": [ + "${EditorTelemetryData}" + ] + } + */ this._telemetryService.publicLog('suggestSnippetInsert', { ...this._editor.getTelemetryData(), suggestionType: suggestion.type }); } diff --git a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts index 472fce09a8639..6e8807a92a054 100644 --- a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts +++ b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts @@ -728,6 +728,15 @@ export class SuggestWidget implements IContentWidget, IDelegate } else { const { stats } = this.completionModel; stats['wasAutomaticallyTriggered'] = !!isAuto; + /* __GDPR__ + "suggestWidget" : { + "wasAutomaticallyTriggered" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "${include}": [ + "${ICompletionStats}", + "${EditorTelemetryData}" + ] + } + */ this.telemetryService.publicLog('suggestWidget', { ...stats, ...this.editor.getTelemetryData() }); this.focusedItem = null; @@ -855,6 +864,13 @@ export class SuggestWidget implements IContentWidget, IDelegate this.details.element.style.borderColor = this.detailsFocusBorderColor; } } + /* __GDPR__ + "suggestWidget:toggleDetailsFocus" : { + "${include}": [ + "${EditorTelemetryData}" + ] + } + */ this.telemetryService.publicLog('suggestWidget:toggleDetailsFocus', this.editor.getTelemetryData()); } @@ -869,6 +885,13 @@ export class SuggestWidget implements IContentWidget, IDelegate removeClass(this.element, 'docs-side'); removeClass(this.element, 'docs-below'); this.editor.layoutContentWidget(this); + /* __GDPR__ + "suggestWidget:collapseDetails" : { + "${include}": [ + "${EditorTelemetryData}" + ] + } + */ this.telemetryService.publicLog('suggestWidget:collapseDetails', this.editor.getTelemetryData()); } else { if (this.state !== State.Open && this.state !== State.Details) { @@ -877,6 +900,13 @@ export class SuggestWidget implements IContentWidget, IDelegate this.updateExpandDocsSetting(true); this.showDetails(); + /* __GDPR__ + "suggestWidget:expandDetails" : { + "${include}": [ + "${EditorTelemetryData}" + ] + } + */ this.telemetryService.publicLog('suggestWidget:expandDetails', this.editor.getTelemetryData()); } diff --git a/src/vs/platform/contextview/browser/contextMenuHandler.ts b/src/vs/platform/contextview/browser/contextMenuHandler.ts index 3a3b3e0e22c4c..dbec87d2e954b 100644 --- a/src/vs/platform/contextview/browser/contextMenuHandler.ts +++ b/src/vs/platform/contextview/browser/contextMenuHandler.ts @@ -44,6 +44,12 @@ export class ContextMenuHandler { this.toDispose.push(this.actionRunner.addListener(EventType.BEFORE_RUN, (e: any) => { if (this.telemetryService) { + /* __GDPR__ + "workbenchActionExecuted" : { + "id" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "from": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ this.telemetryService.publicLog('workbenchActionExecuted', { id: e.action.id, from: 'contextMenu' }); } diff --git a/src/vs/platform/extensionManagement/common/extensionManagementUtil.ts b/src/vs/platform/extensionManagement/common/extensionManagementUtil.ts index 7b4a1690e71d9..f8684f13156c6 100644 --- a/src/vs/platform/extensionManagement/common/extensionManagementUtil.ts +++ b/src/vs/platform/extensionManagement/common/extensionManagementUtil.ts @@ -62,6 +62,21 @@ export function getLocalExtensionTelemetryData(extension: ILocalExtension): any }; } + +/* __GDPR__FRAGMENT__ + "GalleryExtensionTelemetryData" : { + "id" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "name": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "galleryId": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "publisherId": { "classification": "PublicNonPersonalData", "purpose": "FeatureInsight" }, + "publisherName": { "classification": "PublicNonPersonalData", "purpose": "FeatureInsight" }, + "publisherDisplayName": { "classification": "PublicPersonalData", "purpose": "FeatureInsight" }, + "dependencies": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "${include}": [ + "${GalleryExtensionTelemetryData2}" + ] + } +*/ export function getGalleryExtensionTelemetryData(extension: IGalleryExtension): any { return { id: extension.id, diff --git a/src/vs/platform/extensionManagement/node/extensionGalleryService.ts b/src/vs/platform/extensionManagement/node/extensionGalleryService.ts index e265f2ddad47c..7ee13df86d6ed 100644 --- a/src/vs/platform/extensionManagement/node/extensionGalleryService.ts +++ b/src/vs/platform/extensionManagement/node/extensionGalleryService.ts @@ -263,6 +263,13 @@ function toExtension(galleryExtension: IRawGalleryExtension, extensionsGalleryUr dependencies: getDependencies(version), engine: getEngine(version) }, + /* __GDPR__FRAGMENT__ + "GalleryExtensionTelemetryData2" : { + "index" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "searchText": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "querySource": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ telemetryData: { index: ((query.pageNumber - 1) * query.pageSize) + index, searchText: query.searchText, @@ -311,6 +318,12 @@ export class ExtensionGalleryService implements IExtensionGalleryService { let text = options.text || ''; const pageSize = getOrDefault(options, o => o.pageSize, 50); + /* __GDPR__ + "galleryService:query" : { + "type" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "text": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ this.telemetryService.publicLog('galleryService:query', { type, text }); let query = new Query() @@ -426,6 +439,14 @@ export class ExtensionGalleryService implements IExtensionGalleryService { const zipPath = path.join(tmpdir(), uuid.generateUuid()); const data = getGalleryExtensionTelemetryData(extension); const startTime = new Date().getTime(); + /* __GDPR__ + "galleryService:downloadVSIX" : { + "duration": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, + "${include}": [ + "${GalleryExtensionTelemetryData}" + ] + } + */ const log = (duration: number) => this.telemetryService.publicLog('galleryService:downloadVSIX', assign(data, { duration })); return this.getAsset(extension.assets.download) @@ -566,7 +587,20 @@ export class ExtensionGalleryService implements IExtensionGalleryService { } const message = getErrorMessage(err); + /* __GDPR__ + "galleryService:requestError" : { + "url" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "cdn": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "message": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ this.telemetryService.publicLog('galleryService:requestError', { url, cdn: true, message }); + /* __GDPR__ + "galleryService:cdnFallback" : { + "url" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "message": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ this.telemetryService.publicLog('galleryService:cdnFallback', { url, message }); const fallbackOptions = assign({}, options, { url: fallbackUrl }); @@ -576,6 +610,13 @@ export class ExtensionGalleryService implements IExtensionGalleryService { } const message = getErrorMessage(err); + /* __GDPR__ + "galleryService:requestError" : { + "url" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "cdn": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "message": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ this.telemetryService.publicLog('galleryService:requestError', { url: fallbackUrl, cdn: false, message }); return TPromise.wrapError(err); }); diff --git a/src/vs/platform/opener/browser/openerService.ts b/src/vs/platform/opener/browser/openerService.ts index d567a6f57793f..81ce66693868f 100644 --- a/src/vs/platform/opener/browser/openerService.ts +++ b/src/vs/platform/opener/browser/openerService.ts @@ -30,6 +30,11 @@ export class OpenerService implements IOpenerService { open(resource: URI, options?: { openToSide?: boolean }): TPromise { + /* __GDPR__ + "openerService" : { + "scheme" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ this._telemetryService.publicLog('openerService', { scheme: resource.scheme }); const { scheme, path, query, fragment } = resource; diff --git a/src/vs/platform/search/common/search.ts b/src/vs/platform/search/common/search.ts index ab315d50f0fe3..bb2a8df08e48e 100644 --- a/src/vs/platform/search/common/search.ts +++ b/src/vs/platform/search/common/search.ts @@ -70,7 +70,16 @@ export enum QueryType { File = 1, Text = 2 } - +/* __GDPR__FRAGMENT__ + "IPatternInfo" : { + "pattern" : { "classification": "CustomerContent", "purpose": "FeatureInsight" }, + "isRegExp": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "isWordMatch": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "wordSeparators": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "isMultiline": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "isCaseSensitive": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } +*/ export interface IPatternInfo { pattern: string; isRegExp?: boolean; diff --git a/src/vs/platform/telemetry/browser/errorTelemetry.ts b/src/vs/platform/telemetry/browser/errorTelemetry.ts index 5bf022e190c15..976335c3d817d 100644 --- a/src/vs/platform/telemetry/browser/errorTelemetry.ts +++ b/src/vs/platform/telemetry/browser/errorTelemetry.ts @@ -143,6 +143,17 @@ export default class ErrorTelemetry { private _flushBuffer(): void { for (let error of this._buffer) { + /* __GDPR__ + "UnhandledError" : { + "message" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, + "name": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, + "stack": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, + "id": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, + "line": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, + "column": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" } + } + */ + // __GDPR__TODO__ what's the complete set of properties? this._telemetryService.publicLog('UnhandledError', error); } this._buffer.length = 0; diff --git a/src/vs/platform/telemetry/common/experiments.ts b/src/vs/platform/telemetry/common/experiments.ts index 6911c88176060..82350aa22c6bf 100644 --- a/src/vs/platform/telemetry/common/experiments.ts +++ b/src/vs/platform/telemetry/common/experiments.ts @@ -8,6 +8,11 @@ import { IConfigurationService } from 'vs/platform/configuration/common/configur import { IStorageService } from 'vs/platform/storage/common/storage'; import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; +/* __GDPR__FRAGMENT__ + "IExperiments" : { + "deployToAzureQuickLink" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } +*/ export interface IExperiments { ripgrepQuickSearch: boolean; } diff --git a/src/vs/platform/telemetry/common/telemetryService.ts b/src/vs/platform/telemetry/common/telemetryService.ts index b452e7f8342c7..0ebdb46ff3803 100644 --- a/src/vs/platform/telemetry/common/telemetryService.ts +++ b/src/vs/platform/telemetry/common/telemetryService.ts @@ -65,6 +65,11 @@ export class TelemetryService implements ITelemetryService { if (this._configurationService) { this._updateUserOptIn(); this._configurationService.onDidUpdateConfiguration(this._updateUserOptIn, this, this._disposables); + /* __GDPR__ + "optInStatus" : { + "optIn" : { "classification": "SystemMetaData", "purpose": "BusinessInsight" } + } + */ this.publicLog('optInStatus', { optIn: this._userOptIn }); } } diff --git a/src/vs/platform/telemetry/common/telemetryUtils.ts b/src/vs/platform/telemetry/common/telemetryUtils.ts index d1c8b3db1563c..a910df659838c 100644 --- a/src/vs/platform/telemetry/common/telemetryUtils.ts +++ b/src/vs/platform/telemetry/common/telemetryUtils.ts @@ -66,6 +66,13 @@ export function anonymize(input: string): string { return r; } +/* __GDPR__FRAGMENT__ + "URIDescriptor" : { + "mimeType" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "ext": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "path": { "classification": "CustomerContent", "purpose": "FeatureInsight" } + } +*/ export interface URIDescriptor { mimeType?: string; ext?: string; @@ -180,10 +187,22 @@ const configurationValueWhitelist = [ export function configurationTelemetry(telemetryService: ITelemetryService, configurationService: IConfigurationService): IDisposable { return configurationService.onDidUpdateConfiguration(event => { if (event.source !== ConfigurationSource.Default) { + /* __GDPR__ + "updateConfiguration" : { + "configurationSource" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "configurationKeys": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ telemetryService.publicLog('updateConfiguration', { configurationSource: ConfigurationSource[event.source], configurationKeys: flattenKeys(event.sourceConfig) }); + /* __GDPR__ + "updateConfigurationValues" : { + "configurationSource" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "configurationValues": { "classification": "CustomerContent", "purpose": "FeatureInsight" } + } + */ telemetryService.publicLog('updateConfigurationValues', { configurationSource: ConfigurationSource[event.source], configurationValues: flattenValues(event.sourceConfig, configurationValueWhitelist) @@ -194,6 +213,11 @@ export function configurationTelemetry(telemetryService: ITelemetryService, conf export function lifecycleTelemetry(telemetryService: ITelemetryService, lifecycleService: ILifecycleService): IDisposable { return lifecycleService.onShutdown(event => { + /* __GDPR__ + "shutdown" : { + "reason" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ telemetryService.publicLog('shutdown', { reason: ShutdownReason[event] }); }); } @@ -201,6 +225,11 @@ export function lifecycleTelemetry(telemetryService: ITelemetryService, lifecycl export function keybindingsTelemetry(telemetryService: ITelemetryService, keybindingService: IKeybindingService): IDisposable { return keybindingService.onDidUpdateKeybindings(event => { if (event.source === KeybindingSource.User && event.keybindings) { + /* __GDPR__ + "updateKeybindings" : { + "bindings": { "classification": "CustomerContent", "purpose": "FeatureInsight" } + } + */ telemetryService.publicLog('updateKeybindings', { bindings: event.keybindings.map(binding => ({ key: binding.key, diff --git a/src/vs/platform/telemetry/node/commonProperties.ts b/src/vs/platform/telemetry/node/commonProperties.ts index ea27f5c5b6c73..3ee844f84e36c 100644 --- a/src/vs/platform/telemetry/node/commonProperties.ts +++ b/src/vs/platform/telemetry/node/commonProperties.ts @@ -14,27 +14,38 @@ export const machineIdIpcChannel = 'vscode:machineId'; export function resolveCommonProperties(commit: string, version: string, source: string): TPromise<{ [name: string]: string; }> { const result: { [name: string]: string; } = Object.create(null); + // __GDPR__COMMON__ "sessionID" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } result['sessionID'] = uuid.generateUuid() + Date.now(); + // __GDPR__COMMON__ "commitHash" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } result['commitHash'] = commit; + // __GDPR__COMMON__ "version" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } result['version'] = version; + // __GDPR__COMMON__ "common.osVersion" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } result['common.osVersion'] = os.release(); + // __GDPR__COMMON__ "common.platform" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } result['common.platform'] = Platform.Platform[Platform.platform]; + // __GDPR__COMMON__ "common.nodePlatform" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } result['common.nodePlatform'] = process.platform; + // __GDPR__COMMON__ "common.nodeArch" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } result['common.nodeArch'] = process.arch; + // __GDPR__COMMON__ "common.source" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } result['common.source'] = source; // dynamic properties which value differs on each call let seq = 0; const startTime = Date.now(); Object.defineProperties(result, { + // __GDPR__COMMON__ "timestamp" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } 'timestamp': { get: () => new Date(), enumerable: true }, + // __GDPR__COMMON__ "common.timesincesessionstart" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } 'common.timesincesessionstart': { get: () => Date.now() - startTime, enumerable: true }, + // __GDPR__COMMON__ "common.sequence" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } 'common.sequence': { get: () => seq++, enumerable: true diff --git a/src/vs/platform/telemetry/node/workbenchCommonProperties.ts b/src/vs/platform/telemetry/node/workbenchCommonProperties.ts index c6a5772af4966..01920c0c380ae 100644 --- a/src/vs/platform/telemetry/node/workbenchCommonProperties.ts +++ b/src/vs/platform/telemetry/node/workbenchCommonProperties.ts @@ -16,8 +16,11 @@ const SQM_KEY: string = '\\Software\\Microsoft\\SQMClient'; export function resolveWorkbenchCommonProperties(storageService: IStorageService, commit: string, version: string, source: string): TPromise<{ [name: string]: string }> { return resolveCommonProperties(commit, version, source).then(result => { + // __GDPR__COMMON__ "common.version.shell" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } result['common.version.shell'] = process.versions && (process).versions['electron']; + // __GDPR__COMMON__ "common.version.renderer" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } result['common.version.renderer'] = process.versions && (process).versions['chrome']; + // __GDPR__COMMON__ "common.osVersion" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } result['common.osVersion'] = os.release(); const lastSessionDate = storageService.get('telemetry.lastSessionDate'); @@ -25,16 +28,23 @@ export function resolveWorkbenchCommonProperties(storageService: IStorageService storageService.store('telemetry.firstSessionDate', firstSessionDate); storageService.store('telemetry.lastSessionDate', new Date().toUTCString()); + // __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'; const promises: TPromise[] = []; + // __GDPR__COMMON__ "common.instanceId" : { "classification": "EndUserPseudonymizedInformation", "purpose": "FeatureInsight" } promises.push(getOrCreateInstanceId(storageService).then(value => result['common.instanceId'] = value)); + // __GDPR__COMMON__ "common.machineId" : { "classification": "EndUserPseudonymizedInformation", "purpose": "FeatureInsight" } promises.push(getOrCreateMachineId(storageService).then(value => result['common.machineId'] = value)); if (process.platform === 'win32') { + // __GDPR__COMMON__ "common.sqm.userid" : { "endPoint": "SqmUserId", "classification": "EndUserPseudonymizedInformation", "purpose": "FeatureInsight" } promises.push(getSqmUserId(storageService).then(value => result['common.sqm.userid'] = value)); + // __GDPR__COMMON__ "common.sqm.machineid" : { "endPoint": "SqmMachineId", "classification": "EndUserPseudonymizedInformation", "purpose": "FeatureInsight" } promises.push(getSqmMachineId(storageService).then(value => result['common.sqm.machineid'] = value)); } diff --git a/src/vs/platform/update/electron-main/updateService.ts b/src/vs/platform/update/electron-main/updateService.ts index 8c387a9071064..70571cda7ab6a 100644 --- a/src/vs/platform/update/electron-main/updateService.ts +++ b/src/vs/platform/update/electron-main/updateService.ts @@ -164,6 +164,11 @@ export class UpdateService implements IUpdateService { if (!update) { this._onUpdateNotAvailable.fire(explicit); this.state = State.Idle; + /* __GDPR__ + "update:notAvailable" : { + "explicit" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ this.telemetryService.publicLog('update:notAvailable', { explicit }); } else if (update.url) { @@ -177,6 +182,13 @@ export class UpdateService implements IUpdateService { this._availableUpdate = data; this._onUpdateAvailable.fire({ url: update.url, version: update.version }); this.state = State.UpdateAvailable; + /* __GDPR__ + "update:available" : { + "explicit" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "version": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "currentVersion": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ this.telemetryService.publicLog('update:available', { explicit, version: update.version, currentVersion: product.commit }); } else { @@ -189,6 +201,11 @@ export class UpdateService implements IUpdateService { this._availableUpdate = data; this._onUpdateReady.fire(data); this.state = State.UpdateDownloaded; + /* __GDPR__ + "update:downloaded" : { + "version" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ this.telemetryService.publicLog('update:downloaded', { version: update.version }); } diff --git a/src/vs/workbench/api/electron-browser/mainThreadEditors.ts b/src/vs/workbench/api/electron-browser/mainThreadEditors.ts index dc966dd5cbfc4..40d2943f7e6ee 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadEditors.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadEditors.ts @@ -140,6 +140,11 @@ export class MainThreadEditors implements MainThreadEditorsShape { $tryShowEditor(id: string, position: EditorPosition): TPromise { // check how often this is used + /* __GDPR__ + "api.deprecated" : { + "function" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ this._telemetryService.publicLog('api.deprecated', { function: 'TextEditor.show' }); let mainThreadEditor = this._documentsAndEditors.getEditor(id); @@ -155,6 +160,11 @@ export class MainThreadEditors implements MainThreadEditorsShape { $tryHideEditor(id: string): TPromise { // check how often this is used + /* __GDPR__ + "api.deprecated" : { + "function" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ this._telemetryService.publicLog('api.deprecated', { function: 'TextEditor.hide' }); let mainThreadEditor = this._documentsAndEditors.getEditor(id); diff --git a/src/vs/workbench/api/electron-browser/mainThreadSaveParticipant.ts b/src/vs/workbench/api/electron-browser/mainThreadSaveParticipant.ts index 3e4127cd39b96..1935207a49047 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadSaveParticipant.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadSaveParticipant.ts @@ -266,6 +266,20 @@ export class SaveParticipant implements ISaveParticipant { }); return sequence(promiseFactory).then(() => { + /* __GDPR__ + "saveParticipantStats" : { + "${wildcard}": [ + { + "${prefix}": "Success-", + "${classification}": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" } + }, + { + "${prefix}": "Failure-", + "${classification}": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" } + } + ] + } + */ this._telemetryService.publicLog('saveParticipantStats', stats); }); } diff --git a/src/vs/workbench/api/electron-browser/mainThreadTelemetry.ts b/src/vs/workbench/api/electron-browser/mainThreadTelemetry.ts index 31727b376256f..215f3b95b8641 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadTelemetry.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadTelemetry.ts @@ -25,6 +25,11 @@ export class MainThreadTelemetry implements MainThreadTelemetryShape { } $publicLog(eventName: string, data: any = Object.create(null)): void { + /* __GDPR__FRAGMENT__ + "MainThreadData" : { + "pluginHostTelemetry" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ data[MainThreadTelemetry._name] = true; this._telemetryService.publicLog(eventName, data); } diff --git a/src/vs/workbench/api/node/extHost.api.impl.ts b/src/vs/workbench/api/node/extHost.api.impl.ts index 90df60d5188d8..1ad860d4cdc65 100644 --- a/src/vs/workbench/api/node/extHost.api.impl.ts +++ b/src/vs/workbench/api/node/extHost.api.impl.ts @@ -145,6 +145,15 @@ export function createApiFactory( return undefined; } this._seen.add(apiName); + /* __GDPR__ + "apiUsage" : { + "name" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "extension": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "${include}": [ + "${MainThreadData}" + ] + } + */ return mainThreadTelemetry.$publicLog('apiUsage', { name: apiName, extension: extension.id @@ -494,6 +503,16 @@ export function createApiFactory( return extHostSCM.getLastInputBox(extension); }, createSourceControl(id: string, label: string, rootUri?: vscode.Uri) { + /* __GDPR__ + "registerSCMProvider" : { + "extensionId" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "providerId": { "classification": "PublicNonPersonalData", "purpose": "FeatureInsight" }, + "providerLabel": { "classification": "PublicPersonalData", "purpose": "FeatureInsight" }, + "${include}": [ + "${MainThreadData}" + ] + } + */ mainThreadTelemetry.$publicLog('registerSCMProvider', { extensionId: extension.id, providerId: id, diff --git a/src/vs/workbench/api/node/extHostExtensionService.ts b/src/vs/workbench/api/node/extHostExtensionService.ts index d8ade5408f052..0cec48ba083aa 100644 --- a/src/vs/workbench/api/node/extHostExtensionService.ts +++ b/src/vs/workbench/api/node/extHostExtensionService.ts @@ -281,6 +281,13 @@ export class ExtHostExtensionService implements ExtHostExtensionServiceShape { private _doActivateExtension(extensionDescription: IExtensionDescription, startup: boolean): TPromise { let event = getTelemetryActivationEvent(extensionDescription); + /* __GDPR__ + "activatePlugin" : { + "${include}": [ + "${TelemetryActivationEvent}" + ] + } + */ this._mainThreadTelemetry.$publicLog('activatePlugin', event); if (!extensionDescription.main) { // Treat the extension as being empty => NOT AN ERROR CASE @@ -380,6 +387,21 @@ function loadCommonJSModule(modulePath: string, activationTimesBuilder: Exten } function getTelemetryActivationEvent(extensionDescription: IExtensionDescription): any { + /* __GDPR__FRAGMENT__ + "TelemetryActivationEvent" : { + "id": { "classification": "PublicNonPersonalData", "purpose": "FeatureInsight" }, + "name": { "classification": "PublicNonPersonalData", "purpose": "FeatureInsight" }, + "publisherDisplayName": { "classification": "PublicNonPersonalData", "purpose": "FeatureInsight" }, + "activationEvents": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "isBuiltin": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "${wildcard}": [ + { + "${prefix}": "contribution.", + "${classification}": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + ] + } + */ let event = { id: extensionDescription.id, name: extensionDescription.name, diff --git a/src/vs/workbench/api/node/extHostLanguageFeatures.ts b/src/vs/workbench/api/node/extHostLanguageFeatures.ts index 9439c69b9b7b1..b075808bd0f03 100644 --- a/src/vs/workbench/api/node/extHostLanguageFeatures.ts +++ b/src/vs/workbench/api/node/extHostLanguageFeatures.ts @@ -880,6 +880,7 @@ export class ExtHostLanguageFeatures implements ExtHostLanguageFeaturesShape { const handle = this._nextHandle(); this._adapter.set(handle, new HoverAdapter(this._documents, provider, once((name: string, data: any) => { data['extension'] = extensionId; + // __GDPR__TODO__ Dynamic event names and dynamic properties. Can not be registered statically. this._telemetry.$publicLog(name, data); }))); this._proxy.$registerHoverProvider(handle, selector); diff --git a/src/vs/workbench/api/node/extHostTextEditor.ts b/src/vs/workbench/api/node/extHostTextEditor.ts index a3e9c45edae25..562c99258a599 100644 --- a/src/vs/workbench/api/node/extHostTextEditor.ts +++ b/src/vs/workbench/api/node/extHostTextEditor.ts @@ -595,6 +595,15 @@ export class ExtHostTextEditor2 extends ExtHostTextEditor { for (const call of stackTrace) { const extension = index.findSubstr(call.getFileName()); if (extension) { + /* __GDPR__ + "usesCommandLink" : { + "extension" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "from": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "${include}": [ + "${MainThreadData}" + ] + } + */ this._mainThreadTelemetry.$publicLog('usesCommandLink', { extension: extension.id, from: 'decoration', diff --git a/src/vs/workbench/browser/composite.ts b/src/vs/workbench/browser/composite.ts index 0fba1254c671e..7631f540e6a9a 100644 --- a/src/vs/workbench/browser/composite.ts +++ b/src/vs/workbench/browser/composite.ts @@ -108,6 +108,11 @@ export abstract class Composite extends Component implements IComposite { // Only submit telemetry data when not running from an integration test if (this._telemetryService && this._telemetryService.publicLog) { const eventName: string = 'compositeOpen'; + /* __GDPR__ + "compositeOpen" : { + "composite" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ this._telemetryService.publicLog(eventName, { composite: this.getId() }); } } @@ -121,6 +126,12 @@ export abstract class Composite extends Component implements IComposite { if (this._telemetryService && this._telemetryService.publicLog) { const eventName: string = 'compositeShown'; this._telemetryData.composite = this.getId(); + /* __GDPR__ + "compositeShown" : { + "timeSpent" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, + "composite": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ this._telemetryService.publicLog(eventName, this._telemetryData); } } diff --git a/src/vs/workbench/browser/parts/compositePart.ts b/src/vs/workbench/browser/parts/compositePart.ts index 4c9a65800900c..2d7e3f8dbe011 100644 --- a/src/vs/workbench/browser/parts/compositePart.ts +++ b/src/vs/workbench/browser/parts/compositePart.ts @@ -309,6 +309,12 @@ export abstract class CompositePart extends Part { // Log in telemetry if (this.telemetryService) { + /* __GDPR__ + "workbenchActionExecuted" : { + "id" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "from": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ this.telemetryService.publicLog('workbenchActionExecuted', { id: e.action.id, from: this.nameForTelemetry }); } }); diff --git a/src/vs/workbench/browser/parts/editor/editorGroupsControl.ts b/src/vs/workbench/browser/parts/editor/editorGroupsControl.ts index 46d5f7e644e35..f7653de9370b4 100644 --- a/src/vs/workbench/browser/parts/editor/editorGroupsControl.ts +++ b/src/vs/workbench/browser/parts/editor/editorGroupsControl.ts @@ -443,6 +443,9 @@ export class EditorGroupsControl extends Themable implements IEditorGroupsContro // Log this fact in telemetry if (this.telemetryService) { + /* __GDPR__ + "workbenchEditorMaximized" : {} + */ this.telemetryService.publicLog('workbenchEditorMaximized'); } diff --git a/src/vs/workbench/browser/parts/editor/editorPart.ts b/src/vs/workbench/browser/parts/editor/editorPart.ts index 8d53e32d0d0c2..f5468b7d094ca 100644 --- a/src/vs/workbench/browser/parts/editor/editorPart.ts +++ b/src/vs/workbench/browser/parts/editor/editorPart.ts @@ -166,6 +166,13 @@ export class EditorPart extends Part implements IEditorPart, IEditorGroupService this.revealIfOpen = editorConfig.revealIfOpen; + /* __GDPR__ + "workbenchEditorConfiguration" : { + "${include}": [ + "${IWorkbenchEditorConfiguration}" + ] + } + */ this.telemetryService.publicLog('workbenchEditorConfiguration', editorConfig); } else { this.tabOptions = { @@ -248,10 +255,24 @@ export class EditorPart extends Part implements IEditorPart, IEditorGroupService } private onEditorOpened(identifier: EditorIdentifier): void { + /* __GDPR__ + "editorOpened" : { + "${include}": [ + "${EditorTelemetryDescriptor}" + ] + } + */ this.telemetryService.publicLog('editorOpened', identifier.editor.getTelemetryDescriptor()); } private onEditorClosed(event: EditorCloseEvent): void { + /* __GDPR__ + "editorClosed" : { + "${include}": [ + "${EditorTelemetryDescriptor}" + ] + } + */ this.telemetryService.publicLog('editorClosed', event.editor.getTelemetryDescriptor()); } @@ -319,6 +340,11 @@ export class EditorPart extends Part implements IEditorPart, IEditorGroupService // Opened to the side if (position !== Position.ONE) { + /* __GDPR__ + "workbenchSideEditorOpened" : { + "position" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ this.telemetryService.publicLog('workbenchSideEditorOpened', { position: position }); } diff --git a/src/vs/workbench/browser/parts/editor/titleControl.ts b/src/vs/workbench/browser/parts/editor/titleControl.ts index 24f2303b13161..8f78fd0e94367 100644 --- a/src/vs/workbench/browser/parts/editor/titleControl.ts +++ b/src/vs/workbench/browser/parts/editor/titleControl.ts @@ -259,6 +259,12 @@ export abstract class TitleControl extends Themable implements ITitleAreaControl // Log in telemetry if (this.telemetryService) { + /* __GDPR__ + "workbenchActionExecuted" : { + "id" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "from": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ this.telemetryService.publicLog('workbenchActionExecuted', { id: e.action.id, from: 'editorPart' }); } })); diff --git a/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts b/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts index 10d32871c4b04..c506cc51e440c 100644 --- a/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts +++ b/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts @@ -552,6 +552,12 @@ export class QuickOpenController extends Component implements IQuickOpenService const registry = Registry.as(Extensions.Quickopen); const handlerDescriptor = registry.getQuickOpenHandler(prefix) || registry.getDefaultQuickOpenHandler(); + /* __GDPR__ + "quickOpenWidgetShown" : { + "mode" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "quickNavigate": { "${inline}": [ "${IQuickNavigateConfiguration}" ] } + } + */ this.telemetryService.publicLog('quickOpenWidgetShown', { mode: handlerDescriptor.getId(), quickNavigate: quickNavigateConfiguration }); // Trigger onOpen diff --git a/src/vs/workbench/browser/parts/statusbar/statusbarPart.ts b/src/vs/workbench/browser/parts/statusbar/statusbarPart.ts index 1091ddda96878..72bfb28604cc7 100644 --- a/src/vs/workbench/browser/parts/statusbar/statusbarPart.ts +++ b/src/vs/workbench/browser/parts/statusbar/statusbarPart.ts @@ -293,6 +293,12 @@ class StatusBarEntryItem implements IStatusbarItem { const action = this.instantiationService.createInstance(builtInActionDescriptor.syncDescriptor); if (action.enabled) { + /* __GDPR__ + "workbenchActionExecuted" : { + "id" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "from": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ this.telemetryService.publicLog('workbenchActionExecuted', { id: action.id, from: 'status bar' }); (action.run() || TPromise.as(null)).done(() => { action.dispose(); diff --git a/src/vs/workbench/common/actions.ts b/src/vs/workbench/common/actions.ts index cc950f797bace..1bd3ba72aa645 100644 --- a/src/vs/workbench/common/actions.ts +++ b/src/vs/workbench/common/actions.ts @@ -170,6 +170,12 @@ function triggerAndDisposeAction(instantitationService: IInstantiationService, t const from = args && args.from || 'keybinding'; if (telemetryService) { + /* __GDPR__ + "workbenchActionExecuted" : { + "id" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "from": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ telemetryService.publicLog('workbenchActionExecuted', { id: actionInstance.id, from }); } diff --git a/src/vs/workbench/common/editor.ts b/src/vs/workbench/common/editor.ts index a058c6e902a20..72b481737f9e6 100644 --- a/src/vs/workbench/common/editor.ts +++ b/src/vs/workbench/common/editor.ts @@ -203,6 +203,11 @@ export abstract class EditorInput implements IEditorInput { * Subclasses should extend if they can contribute. */ public getTelemetryDescriptor(): object { + /* __GDPR__FRAGMENT__ + "EditorTelemetryDescriptor" : { + "typeId" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ return { typeId: this.getTypeId() }; } @@ -792,6 +797,19 @@ export const EditorOpenPositioning = { }; export interface IWorkbenchEditorConfiguration { + /* __GDPR__FRAGMENT__ + "IWorkbenchEditorConfiguration" : { + "showTabs" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "tabCloseButton": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "showIcons": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "enablePreview": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "enablePreviewFromQuickOpen": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "closeOnFileDelete": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "openPositioning": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "revealIfOpen": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "swipeToNavigate": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ workbench: { editor: { showTabs: boolean; diff --git a/src/vs/workbench/common/editor/resourceEditorInput.ts b/src/vs/workbench/common/editor/resourceEditorInput.ts index 3c33a6d16ecbd..ea19725e484fb 100644 --- a/src/vs/workbench/common/editor/resourceEditorInput.ts +++ b/src/vs/workbench/common/editor/resourceEditorInput.ts @@ -72,6 +72,11 @@ export class ResourceEditorInput extends EditorInput { const descriptor = super.getTelemetryDescriptor(); descriptor['resource'] = telemetryURIDescriptor(this.resource); + /* __GDPR__FRAGMENT__ + "EditorTelemetryDescriptor" : { + "resource": { "${inline}": [ "${URIDescriptor}" ] } + } + */ return descriptor; } diff --git a/src/vs/workbench/common/editor/untitledEditorInput.ts b/src/vs/workbench/common/editor/untitledEditorInput.ts index dac7180d617c1..8057bef0160d8 100644 --- a/src/vs/workbench/common/editor/untitledEditorInput.ts +++ b/src/vs/workbench/common/editor/untitledEditorInput.ts @@ -254,6 +254,11 @@ export class UntitledEditorInput extends EditorInput implements IEncodingSupport const descriptor = super.getTelemetryDescriptor(); descriptor['resource'] = telemetryURIDescriptor(this.getResource()); + /* __GDPR__FRAGMENT__ + "EditorTelemetryDescriptor" : { + "resource": { "${inline}": [ "${URIDescriptor}" ] } + } + */ return descriptor; } diff --git a/src/vs/workbench/electron-browser/nodeCachedDataManager.ts b/src/vs/workbench/electron-browser/nodeCachedDataManager.ts index c21787e2e2800..5f5ac8e12d74b 100644 --- a/src/vs/workbench/electron-browser/nodeCachedDataManager.ts +++ b/src/vs/workbench/electron-browser/nodeCachedDataManager.ts @@ -32,6 +32,12 @@ export class NodeCachedDataManager { // log each failure separately if (err) { + /* __GDPR__ + "cachedDataError" : { + "errorCode" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, + "path": { "classification": "CustomerContent", "purpose": "PerformanceAndHealth" } + } + */ this._telemetryService.publicLog('cachedDataError', { errorCode: err.errorCode, path: basename(err.path) @@ -40,6 +46,13 @@ export class NodeCachedDataManager { } // log summary + /* __GDPR__ + "cachedDataInfo" : { + "didRequestCachedData" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, + "didRejectCachedData": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, + "didProduceCachedData": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" } + } + */ this._telemetryService.publicLog('cachedDataInfo', { didRequestCachedData: Boolean(global.require.getConfig().nodeCachedDataDir), didRejectCachedData, diff --git a/src/vs/workbench/electron-browser/shell.ts b/src/vs/workbench/electron-browser/shell.ts index fd99f05e00a49..7069ea3f44376 100644 --- a/src/vs/workbench/electron-browser/shell.ts +++ b/src/vs/workbench/electron-browser/shell.ts @@ -199,6 +199,28 @@ export class WorkbenchShell { // Telemetry: workspace info const { filesToOpen, filesToCreate, filesToDiff } = this.configuration; + /* __GDPR__ + "workspaceLoad" : { + "userAgent" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "windowSize.innerHeight": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "windowSize.innerWidth": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "windowSize.outerHeight": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "windowSize.outerWidth": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "emptyWorkbench": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "workbench.filesToOpen": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "workbench.filesToCreate": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "workbench.filesToDiff": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "customKeybindingsCount": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "theme": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "language": { "classification": "SystemMetaData", "purpose": "BusinessInsight" }, + "experiments": { "${inline}": [ "${IExperiments}" ] }, + "pinnedViewlets": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "restoredViewlet": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "restoredEditors": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "pinnedViewlets": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "startupKind": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ this.telemetryService.publicLog('workspaceLoad', { userAgent: navigator.userAgent, windowSize: { innerHeight: window.innerHeight, innerWidth: window.innerWidth, outerHeight: window.outerHeight, outerWidth: window.outerWidth }, @@ -221,6 +243,13 @@ export class WorkbenchShell { this.timerService.restoreEditorsDuration = info.restoreEditorsDuration; this.timerService.restoreViewletDuration = info.restoreViewletDuration; this.extensionService.onReady().done(() => { + /* __GDPR__ + "startupTime" : { + "${include}": [ + "${IStartupMetrics}" + ] + } + */ this.telemetryService.publicLog('startupTime', this.timerService.startupMetrics); }); @@ -288,6 +317,12 @@ export class WorkbenchShell { const idleMonitor = new IdleMonitor(2 * 60 * 1000); // 2 minutes const listener = idleMonitor.onStatusChange(status => + /* __GDPR__ + "UserIdleStart" : {} + */ + /* __GDPR__ + "UserIdleStop" : {} + */ this.telemetryService.publicLog(status === UserStatus.Active ? TelemetryService.IDLE_STOP_EVENT_NAME : TelemetryService.IDLE_START_EVENT_NAME diff --git a/src/vs/workbench/electron-browser/window.ts b/src/vs/workbench/electron-browser/window.ts index 622cf14e8d33a..bdf4e7eeef273 100644 --- a/src/vs/workbench/electron-browser/window.ts +++ b/src/vs/workbench/electron-browser/window.ts @@ -145,6 +145,12 @@ export class ElectronWindow extends Themable { } this.commandService.executeCommand(request.id, ...args).done(_ => { + /* __GDPR__ + "commandExecuted" : { + "id" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "from": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ this.telemetryService.publicLog('commandExecuted', { id: request.id, from: request.from }); }, err => { this.messageService.show(Severity.Error, err); diff --git a/src/vs/workbench/parts/debug/browser/debugActionsWidget.ts b/src/vs/workbench/parts/debug/browser/debugActionsWidget.ts index 78aefdb3d5292..fed2b8590fcbe 100644 --- a/src/vs/workbench/parts/debug/browser/debugActionsWidget.ts +++ b/src/vs/workbench/parts/debug/browser/debugActionsWidget.ts @@ -102,6 +102,12 @@ export class DebugActionsWidget extends Themable implements IWorkbenchContributi // log in telemetry if (this.telemetryService) { + /* __GDPR__ + "workbenchActionExecuted" : { + "id" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "from": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ this.telemetryService.publicLog('workbenchActionExecuted', { id: e.action.id, from: 'debugActionsWidget' }); } })); @@ -141,6 +147,11 @@ export class DebugActionsWidget extends Themable implements IWorkbenchContributi private storePosition(): void { const position = parseFloat(this.$el.getComputedStyle().left) / window.innerWidth; this.storageService.store(DEBUG_ACTIONS_WIDGET_POSITION_KEY, position, StorageScope.WORKSPACE); + /* __GDPR__ + "debug.actionswidgetposition" : { + "position" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ this.telemetryService.publicLog(DEBUG_ACTIONS_WIDGET_POSITION_KEY, { position }); } diff --git a/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.ts b/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.ts index bcb12909cf66a..0660d442cfa5c 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.ts @@ -411,6 +411,9 @@ export class DebugEditorContribution implements IDebugEditorContribution { } public addLaunchConfiguration(): TPromise { + /* __GDPR__ + "debug/addLaunchConfiguration" : {} + */ this.telemetryService.publicLog('debug/addLaunchConfiguration'); let configurationsArrayPosition: Position; const model = this.editor.getModel(); diff --git a/src/vs/workbench/parts/debug/electron-browser/debugService.ts b/src/vs/workbench/parts/debug/electron-browser/debugService.ts index 2b53058eb9f32..52015666642a4 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugService.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugService.ts @@ -341,6 +341,7 @@ export class DebugService implements debug.IDebugService { // only log telemetry events from debug adapter if the adapter provided the telemetry key // and the user opted in telemetry if (session.customTelemetryService && this.telemetryService.isOptedIn) { + // __GDPR__TODO__ We're sending events in the name of the debug adapter and we can not ensure that those are declared correctly. session.customTelemetryService.publicLog(event.body.output, event.body.data); } @@ -607,6 +608,9 @@ export class DebugService implements debug.IDebugService { } public addReplExpression(name: string): TPromise { + /* __GDPR__ + "debugService/addReplExpression" : {} + */ this.telemetryService.publicLog('debugService/addReplExpression'); return this.model.addReplExpression(this.viewModel.focusedProcess, this.viewModel.focusedStackFrame, name) // Evaluate all watch expressions and fetch variables again since repl evaluation might have changed some. @@ -909,6 +913,17 @@ export class DebugService implements debug.IDebugService { } this.updateStateAndEmit(session.getId(), debug.State.Running); + /* __GDPR__ + "debugSessionStart" : { + "type": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "breakpointCount": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "exceptionBreakpoints": { "classification": "CustomerContent", "purpose": "FeatureInsight" }, + "watchExpressionsCount": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "extensionName": { "classification": "PublicPersonalData", "purpose": "FeatureInsight" }, + "isBuiltin": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "launchJsonExists": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ return this.telemetryService.publicLog('debugSessionStart', { type: configuration.type, breakpointCount: this.model.getBreakpoints().length, @@ -925,6 +940,12 @@ export class DebugService implements debug.IDebugService { } const errorMessage = error instanceof Error ? error.message : error; + /* __GDPR__ + "debugMisconfiguration" : { + "type" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "error": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ this.telemetryService.publicLog('debugMisconfiguration', { type: configuration ? configuration.type : undefined, error: errorMessage }); this.updateStateAndEmit(session.getId(), debug.State.Inactive); if (!session.disconnected) { @@ -1039,6 +1060,15 @@ export class DebugService implements debug.IDebugService { private onSessionEnd(session: RawDebugSession): void { const bpsExist = this.model.getBreakpoints().length > 0; const process = this.model.getProcesses().filter(p => p.getId() === session.getId()).pop(); + /* __GDPR__ + "debugSessionStop" : { + "type" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "success": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "sessionLengthInSeconds": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "breakpointCount": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "watchExpressionsCount": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ this.telemetryService.publicLog('debugSessionStop', { type: process && process.configuration.type, success: session.emittedStopped || !bpsExist, diff --git a/src/vs/workbench/parts/debug/electron-browser/rawDebugSession.ts b/src/vs/workbench/parts/debug/electron-browser/rawDebugSession.ts index 992f4a6d673bf..6ed9ed23c887e 100644 --- a/src/vs/workbench/parts/debug/electron-browser/rawDebugSession.ts +++ b/src/vs/workbench/parts/debug/electron-browser/rawDebugSession.ts @@ -164,8 +164,17 @@ export class RawDebugSession extends V8Protocol implements debug.ISession { const errorMessage = errorResponse ? errorResponse.message : ''; const telemetryMessage = error ? debug.formatPII(error.format, true, error.variables) : errorMessage; if (error && error.sendTelemetry) { + /* __GDPR__ + "debugProtocolErrorResponse" : { + "error" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ this.telemetryService.publicLog('debugProtocolErrorResponse', { error: telemetryMessage }); if (this.customTelemetryService) { + /* __GDPR__TODO__ + The message is sent in the name of the adapter but the adapter doesn't know about it. + However, since adapters are an open-ended set, we can not declared the events statically either. + */ this.customTelemetryService.publicLog('debugProtocolErrorResponse', { error: telemetryMessage }); } } diff --git a/src/vs/workbench/parts/extensions/browser/extensionEditor.ts b/src/vs/workbench/parts/extensions/browser/extensionEditor.ts index 16b88273dd35c..e49587e3c0c58 100644 --- a/src/vs/workbench/parts/extensions/browser/extensionEditor.ts +++ b/src/vs/workbench/parts/extensions/browser/extensionEditor.ts @@ -265,6 +265,13 @@ export class ExtensionEditor extends BaseEditor { this.transientDisposables = dispose(this.transientDisposables); + /* __GDPR__ + "extensionGallery:openExtension" : { + "${include}": [ + "${GalleryExtensionTelemetryData}" + ] + } + */ this.telemetryService.publicLog('extensionGallery:openExtension', extension.telemetryData); this.extensionReadme = new Cache(() => extension.getReadme()); diff --git a/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.ts b/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.ts index d49a036b40670..485063d9d1471 100644 --- a/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.ts +++ b/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.ts @@ -114,6 +114,12 @@ export class ExtensionTipsService implements IExtensionTipsService { const exeBased = distinct(this._exeBasedRecommendations); + /* __GDPR__ + "extensionRecommendations:unfiltered" : { + "fileBased" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "exeBased": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ this.telemetryService.publicLog('extensionRecommendations:unfiltered', { fileBased, exeBased }); return distinct([...fileBased, ...exeBased]); @@ -247,6 +253,12 @@ export class ExtensionTipsService implements IExtensionTipsService { this.choiceService.choose(Severity.Info, message, options, 2).done(choice => { switch (choice) { case 0: + /* __GDPR__ + "extensionRecommendations:popup" : { + "userReaction" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "extensionId": { "classification": "PublicNonPersonalData", "purpose": "FeatureInsight" } + } + */ this.telemetryService.publicLog('extensionRecommendations:popup', { userReaction: 'show', extensionId: name }); return recommendationsAction.run(); case 1: this.importantRecommendationsIgnoreList.push(id); @@ -255,12 +267,30 @@ export class ExtensionTipsService implements IExtensionTipsService { JSON.stringify(this.importantRecommendationsIgnoreList), StorageScope.GLOBAL ); + /* __GDPR__ + "extensionRecommendations:popup" : { + "userReaction" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "extensionId": { "classification": "PublicNonPersonalData", "purpose": "FeatureInsight" } + } + */ this.telemetryService.publicLog('extensionRecommendations:popup', { userReaction: 'neverShowAgain', extensionId: name }); return this.ignoreExtensionRecommendations(); case 2: + /* __GDPR__ + "extensionRecommendations:popup" : { + "userReaction" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "extensionId": { "classification": "PublicNonPersonalData", "purpose": "FeatureInsight" } + } + */ this.telemetryService.publicLog('extensionRecommendations:popup', { userReaction: 'close', extensionId: name }); } }, () => { + /* __GDPR__ + "extensionRecommendations:popup" : { + "userReaction" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "extensionId": { "classification": "PublicNonPersonalData", "purpose": "FeatureInsight" } + } + */ this.telemetryService.publicLog('extensionRecommendations:popup', { userReaction: 'cancelled', extensionId: name }); }); }); @@ -305,15 +335,35 @@ export class ExtensionTipsService implements IExtensionTipsService { this.choiceService.choose(Severity.Info, message, options, 2).done(choice => { switch (choice) { case 0: + /* __GDPR__ + "extensionRecommendations:popup" : { + "userReaction" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ this.telemetryService.publicLog('extensionWorkspaceRecommendations:popup', { userReaction: 'show' }); return action.run(); case 1: + /* __GDPR__ + "extensionRecommendations:popup" : { + "userReaction" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ this.telemetryService.publicLog('extensionWorkspaceRecommendations:popup', { userReaction: 'neverShowAgain' }); return this.storageService.store(storageKey, true, StorageScope.WORKSPACE); case 2: + /* __GDPR__ + "extensionRecommendations:popup" : { + "userReaction" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ this.telemetryService.publicLog('extensionWorkspaceRecommendations:popup', { userReaction: 'close' }); } }, () => { + /* __GDPR__ + "extensionRecommendations:popup" : { + "userReaction" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ this.telemetryService.publicLog('extensionWorkspaceRecommendations:popup', { userReaction: 'cancelled' }); }); }); diff --git a/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.ts b/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.ts index bfd75970a5917..2b8ed719ea329 100644 --- a/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.ts +++ b/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.ts @@ -68,10 +68,24 @@ export class KeymapExtensions implements IWorkbenchContribution { } private promptForDisablingOtherKeymaps(newKeymap: IExtensionStatus, oldKeymaps: IExtensionStatus[]): TPromise { + /* __GDPR__FRAGMENT__ + "KeyMapsData" : { + "newKeymap" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "oldKeymaps": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ const telemetryData: { [key: string]: any; } = { newKeymap: newKeymap.identifier, oldKeymaps: oldKeymaps.map(k => k.identifier) }; + + /* __GDPR__ + "disableOtherKeymapsConfirmation" : { + "${include}": [ + "${KeyMapsData}" + ] + } + */ this.telemetryService.publicLog('disableOtherKeymapsConfirmation', telemetryData); const message = localize('disableOtherKeymapsConfirmation', "Disable other keymaps ({0}) to avoid conflicts between keybindings?", oldKeymaps.map(k => `'${k.local.manifest.displayName}'`).join(', ')); const options = [ @@ -82,6 +96,14 @@ export class KeymapExtensions implements IWorkbenchContribution { .then(value => { const confirmed = value === 0; telemetryData['confirmed'] = confirmed; + /* __GDPR__ + "disableOtherKeymaps" : { + "confirmed" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "${include}": [ + "${KeyMapsData}" + ] + } + */ this.telemetryService.publicLog('disableOtherKeymaps', telemetryData); if (confirmed) { return TPromise.join(oldKeymaps.map(keymap => { @@ -153,11 +175,19 @@ export class BetterMergeDisabled implements IWorkbenchContribution { extensionService.onReady().then(() => { if (storageService.getBoolean(BetterMergeDisabledNowKey, StorageScope.GLOBAL, false)) { storageService.remove(BetterMergeDisabledNowKey, StorageScope.GLOBAL); + /* __GDPR__ + "betterMergeDisabled" : {} + */ telemetryService.publicLog('betterMergeDisabled'); messageService.show(Severity.Info, { message: localize('betterMergeDisabled', "The Better Merge extension is now built-in, the installed extension was disabled and can be uninstalled."), actions: [ new Action('uninstall', localize('uninstall', "Uninstall"), null, true, () => { + /* __GDPR__ + "betterMergeUninstall" : { + "outcome" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ telemetryService.publicLog('betterMergeUninstall', { outcome: 'uninstall', }); @@ -167,6 +197,11 @@ export class BetterMergeDisabled implements IWorkbenchContribution { }); }), new Action('later', localize('later', "Later"), null, true, () => { + /* __GDPR__ + "betterMergeUninstall" : { + "outcome" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ telemetryService.publicLog('betterMergeUninstall', { outcome: 'later', }); diff --git a/src/vs/workbench/parts/extensions/electron-browser/extensionsViews.ts b/src/vs/workbench/parts/extensions/electron-browser/extensionsViews.ts index d8fd1c8ec8f48..98e10761626ac 100644 --- a/src/vs/workbench/parts/extensions/electron-browser/extensionsViews.ts +++ b/src/vs/workbench/parts/extensions/electron-browser/extensionsViews.ts @@ -315,6 +315,11 @@ export class ExtensionsListView extends ViewsViewletPanel { .filter(name => local.every(ext => `${ext.publisher}.${ext.name}` !== name)) .filter(name => name.toLowerCase().indexOf(value) > -1); + /* __GDPR__ + "extensionRecommendations:open" : { + "count" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ this.telemetryService.publicLog('extensionRecommendations:open', { count: names.length }); if (!names.length) { @@ -334,6 +339,11 @@ export class ExtensionsListView extends ViewsViewletPanel { return this.tipsService.getWorkspaceRecommendations() .then(recommendations => { const names = recommendations.filter(name => name.toLowerCase().indexOf(value) > -1); + /* __GDPR__ + "extensionWorkspaceRecommendations:open" : { + "count" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ this.telemetryService.publicLog('extensionWorkspaceRecommendations:open', { count: names.length }); if (!names.length) { @@ -349,6 +359,11 @@ export class ExtensionsListView extends ViewsViewletPanel { const value = query.value.replace(/@recommended:keymaps/g, '').trim().toLowerCase(); const names = this.tipsService.getKeymapRecommendations() .filter(name => name.toLowerCase().indexOf(value) > -1); + /* __GDPR__ + "extensionKeymapRecommendations:open" : { + "count" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ this.telemetryService.publicLog('extensionKeymapRecommendations:open', { count: names.length }); if (!names.length) { diff --git a/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.ts b/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.ts index 39795d8e8a3ff..889f2fe7a8dee 100644 --- a/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.ts +++ b/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.ts @@ -418,6 +418,13 @@ export class ExtensionsWorkbenchService implements IExtensionsWorkbenchService { } open(extension: IExtension, sideByside: boolean = false): TPromise { + /* __GDPR__ + "extensionGallery:open" : { + "${include}": [ + "${GalleryExtensionTelemetryData}" + ] + } + */ this.telemetryService.publicLog('extensionGallery:open', extension.telemetryData); return this.editorService.openEditor(this.instantiationService.createInstance(ExtensionsInput, extension), null, sideByside); } @@ -527,6 +534,20 @@ export class ExtensionsWorkbenchService implements IExtensionsWorkbenchService { } return this.promptAndSetEnablement(extension, enable, workspace).then(reload => { + /* __GDPR__ + "extension:enable" : { + "${include}": [ + "${GalleryExtensionTelemetryData}" + ] + } + */ + /* __GDPR__ + "extension:disable" : { + "${include}": [ + "${GalleryExtensionTelemetryData}" + ] + } + */ this.telemetryService.publicLog(enable ? 'extension:enable' : 'extension:disable', extension.telemetryData); }); } @@ -794,6 +815,36 @@ export class ExtensionsWorkbenchService implements IExtensionsWorkbenchService { const duration = new Date().getTime() - active.start.getTime(); const eventName = toTelemetryEventName(active.operation); + /* __GDPR__ + "extensionGallery:install" : { + "success": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, + "duration" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, + "errorcode": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, + "${include}": [ + "${GalleryExtensionTelemetryData}" + ] + } + */ + /* __GDPR__ + "extensionGallery:update" : { + "success": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, + "duration" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, + "errorcode": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, + "${include}": [ + "${GalleryExtensionTelemetryData}" + ] + } + */ + /* __GDPR__ + "extensionGallery:uninstall" : { + "success": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, + "duration" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, + "errorcode": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, + "${include}": [ + "${GalleryExtensionTelemetryData}" + ] + } + */ this.telemetryService.publicLog(eventName, assign(data, { success: !errorcode, duration, errorcode })); } diff --git a/src/vs/workbench/parts/files/browser/views/explorerViewer.ts b/src/vs/workbench/parts/files/browser/views/explorerViewer.ts index a98fe094684a9..c088be1988d0b 100644 --- a/src/vs/workbench/parts/files/browser/views/explorerViewer.ts +++ b/src/vs/workbench/parts/files/browser/views/explorerViewer.ts @@ -537,6 +537,12 @@ export class FileController extends DefaultController { public openEditor(stat: FileStat, options: { preserveFocus: boolean; sideBySide: boolean; pinned: boolean; }): void { if (stat && !stat.isDirectory) { + /* __GDPR__ + "workbenchActionExecuted" : { + "id" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "from": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ this.telemetryService.publicLog('workbenchActionExecuted', { id: 'workbench.files.openFile', from: 'explorer' }); this.editorService.openEditor({ resource: stat.resource, options }, options.sideBySide).done(null, errors.onUnexpectedError); diff --git a/src/vs/workbench/parts/files/browser/views/openEditorsViewer.ts b/src/vs/workbench/parts/files/browser/views/openEditorsViewer.ts index 67ec00f9bf7ac..a67a4d87ea69a 100644 --- a/src/vs/workbench/parts/files/browser/views/openEditorsViewer.ts +++ b/src/vs/workbench/parts/files/browser/views/openEditorsViewer.ts @@ -273,6 +273,12 @@ export class Controller extends DefaultController { public openEditor(element: OpenEditor, options: { preserveFocus: boolean; pinned: boolean; sideBySide: boolean; }): void { if (element) { + /* __GDPR__ + "workbenchActionExecuted" : { + "id" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "from": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ this.telemetryService.publicLog('workbenchActionExecuted', { id: 'workbench.files.openFile', from: 'openEditors' }); let position = this.model.positionOfGroup(element.editorGroup); if (options.sideBySide && position !== Position.THREE) { diff --git a/src/vs/workbench/parts/files/common/editors/fileEditorInput.ts b/src/vs/workbench/parts/files/common/editors/fileEditorInput.ts index d3930c9fcff64..5b957a6886653 100644 --- a/src/vs/workbench/parts/files/common/editors/fileEditorInput.ts +++ b/src/vs/workbench/parts/files/common/editors/fileEditorInput.ts @@ -277,6 +277,11 @@ export class FileEditorInput extends EditorInput implements IFileEditorInput { const descriptor = super.getTelemetryDescriptor(); descriptor['resource'] = telemetryURIDescriptor(this.getResource()); + /* __GDPR__FRAGMENT__ + "EditorTelemetryDescriptor" : { + "resource": { "${inline}": [ "${URIDescriptor}" ] } + } + */ return descriptor; } diff --git a/src/vs/workbench/parts/markers/browser/markersPanel.ts b/src/vs/workbench/parts/markers/browser/markersPanel.ts index 6eeea5df06ee6..927959df2878a 100644 --- a/src/vs/workbench/parts/markers/browser/markersPanel.ts +++ b/src/vs/workbench/parts/markers/browser/markersPanel.ts @@ -148,6 +148,11 @@ export class MarkersPanel extends Panel { public openFileAtElement(element: any, preserveFocus: boolean, sideByside: boolean, pinned: boolean): boolean { if (element instanceof Marker) { const marker: Marker = element; + /* __GDPR__ + "problems.marker.opened" : { + "source" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ this.telemetryService.publicLog('problems.marker.opened', { source: marker.marker.source }); this.editorService.openEditor({ resource: marker.resource, diff --git a/src/vs/workbench/parts/markers/browser/markersPanelActions.ts b/src/vs/workbench/parts/markers/browser/markersPanelActions.ts index fe2ce8c5d8f2d..12c2d2ad24219 100644 --- a/src/vs/workbench/parts/markers/browser/markersPanelActions.ts +++ b/src/vs/workbench/parts/markers/browser/markersPanelActions.ts @@ -41,6 +41,9 @@ export class ToggleMarkersPanelAction extends TogglePanelAction { public run(): TPromise { let promise = super.run(); if (this.isPanelFocused()) { + /* __GDPR__ + "problems.used" : {} + */ this.telemetryService.publicLog('problems.used'); } return promise; @@ -63,6 +66,9 @@ export class ToggleErrorsAndWarningsAction extends TogglePanelAction { public run(): TPromise { let promise = super.run(); if (this.isPanelFocused()) { + /* __GDPR__ + "problems.used" : {} + */ this.telemetryService.publicLog('problems.used'); } return promise; @@ -77,6 +83,9 @@ export class CollapseAllAction extends TreeCollapseAction { } public run(context?: any): TPromise { + /* __GDPR__ + "problems.collapseAll.used" : {} + */ this.telemetryService.publicLog('problems.collapseAll.used'); return super.run(context); } @@ -132,6 +141,13 @@ export class FilterInputBoxActionItem extends BaseActionItem { data['errors'] = this.markersPanel.markersModel.filterOptions.filterErrors; data['warnings'] = this.markersPanel.markersModel.filterOptions.filterWarnings; data['infos'] = this.markersPanel.markersModel.filterOptions.filterInfos; + /* __GDPR__ + "problems.filter" : { + "errors" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "warnings": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "infos": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ this.telemetryService.publicLog('problems.filter', data); } diff --git a/src/vs/workbench/parts/preferences/browser/keybindingsEditor.ts b/src/vs/workbench/parts/preferences/browser/keybindingsEditor.ts index 895d2d310e46b..c4ee4bce0a96c 100644 --- a/src/vs/workbench/parts/preferences/browser/keybindingsEditor.ts +++ b/src/vs/workbench/parts/preferences/browser/keybindingsEditor.ts @@ -521,6 +521,12 @@ export class KeybindingsEditor extends BaseEditor implements IKeybindingsEditor emptyFilters: this.getLatestEmptyFiltersForTelemetry() }; this.latestEmptyFilters = []; + /* __GDPR__ + "keybindings.filter" : { + "filter": { "classification": "CustomerContent", "purpose": "FeatureInsight" }, + "emptyFilters" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ this.telemetryService.publicLog('keybindings.filter', data); } } @@ -535,6 +541,7 @@ export class KeybindingsEditor extends BaseEditor implements IKeybindingsEditor } private reportKeybindingAction(action: string, command: string, keybinding: ResolvedKeybinding | string): void { + // __GDPR__TODO__ Need to move off dynamic event names and properties as they cannot be registered statically this.telemetryService.publicLog(action, { command, keybinding: keybinding ? (typeof keybinding === 'string' ? keybinding : keybinding.getUserSettingsLabel()) : '' }); } diff --git a/src/vs/workbench/parts/preferences/browser/preferencesEditor.ts b/src/vs/workbench/parts/preferences/browser/preferencesEditor.ts index efad32e7d9be2..8e18f891a8961 100644 --- a/src/vs/workbench/parts/preferences/browser/preferencesEditor.ts +++ b/src/vs/workbench/parts/preferences/browser/preferencesEditor.ts @@ -323,6 +323,12 @@ export class PreferencesEditor extends BaseEditor { emptyFilters: this.getLatestEmptyFiltersForTelemetry() }; this.latestEmptyFilters = []; + /* __GDPR__ + "defaultSettings.filter" : { + "filter": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "emptyFilters" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ this.telemetryService.publicLog('defaultSettings.filter', data); } } diff --git a/src/vs/workbench/parts/preferences/browser/preferencesRenderers.ts b/src/vs/workbench/parts/preferences/browser/preferencesRenderers.ts index afe4390953eac..d74dd56da4648 100644 --- a/src/vs/workbench/parts/preferences/browser/preferencesRenderers.ts +++ b/src/vs/workbench/parts/preferences/browser/preferencesRenderers.ts @@ -108,6 +108,11 @@ export class UserSettingsRenderer extends Disposable implements IPreferencesRend } public updatePreference(key: string, value: any, source: ISetting): void { + /* __GDPR__ + "defaultSettingsActions.copySetting" : { + "userConfigurationKeys" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ this.telemetryService.publicLog('defaultSettingsActions.copySetting', { userConfigurationKeys: [key] }); const overrideIdentifier = source.overrideOf ? overrideIdentifierFromKey(source.overrideOf.key) : null; const resource = this.preferencesModel.uri; diff --git a/src/vs/workbench/parts/preferences/browser/preferencesService.ts b/src/vs/workbench/parts/preferences/browser/preferencesService.ts index c975dfe62f8d8..5e5597721c648 100644 --- a/src/vs/workbench/parts/preferences/browser/preferencesService.ts +++ b/src/vs/workbench/parts/preferences/browser/preferencesService.ts @@ -223,6 +223,11 @@ export class PreferencesService extends Disposable implements IPreferencesServic } openGlobalKeybindingSettings(textual: boolean): TPromise { + /* __GDPR__ + "openKeybindings" : { + "textual" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ this.telemetryService.publicLog('openKeybindings', { textual }); if (textual) { const emptyContents = '// ' + nls.localize('emptyKeybindingsHeader', "Place your key bindings in this file to overwrite the defaults") + '\n[\n]'; diff --git a/src/vs/workbench/parts/quickopen/browser/commandsHandler.ts b/src/vs/workbench/parts/quickopen/browser/commandsHandler.ts index fd7a60f147504..2e4ec96cf1ac0 100644 --- a/src/vs/workbench/parts/quickopen/browser/commandsHandler.ts +++ b/src/vs/workbench/parts/quickopen/browser/commandsHandler.ts @@ -297,6 +297,12 @@ abstract class BaseCommandEntry extends QuickOpenEntryGroup { TPromise.timeout(50).done(() => { if (action && (!(action instanceof Action) || action.enabled)) { try { + /* __GDPR__ + "workbenchActionExecuted" : { + "id" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "from": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ this.telemetryService.publicLog('workbenchActionExecuted', { id: action.id, from: 'quick open' }); (action.run() || TPromise.as(null)).done(() => { if (action instanceof Action) { diff --git a/src/vs/workbench/parts/search/browser/openAnythingHandler.ts b/src/vs/workbench/parts/search/browser/openAnythingHandler.ts index 3eae07844b7cc..7cbc0a22700a6 100644 --- a/src/vs/workbench/parts/search/browser/openAnythingHandler.ts +++ b/src/vs/workbench/parts/search/browser/openAnythingHandler.ts @@ -32,6 +32,38 @@ interface ISearchWithRange { range: IRange; } +/* __GDPR__FRAGMENT__ + "ITimerEventData" : { + "searchLength" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, + "unsortedResultDuration": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, + "sortedResultDuration": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, + "resultCount": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, + "symbols.fromCache": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, + "files.fromCache": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, + "files.unsortedResultDuration": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, + "files.sortedResultDuration": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, + "files.resultCount": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, + "files.traversal": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, + "files.errors": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, + "files.fileWalkStartDuration": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, + "files.fileWalkResultDuration": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, + "files.directoriesWalked": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, + "files.filesWalked": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, + "files.cmdForkStartTime": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, + "files.cmdForkResultTime": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, + "files.cmdResultCount": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, + "files.cacheLookupStartDuration": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, + "files.cacheFilterStartDuration": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, + "files.cacheLookupResultDuration": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, + "files.cacheEntryCount": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, + "${wildcard}": [ + { + "${prefix}": "files.joined", + "${classification}": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" } + } + ] + } +*/ interface ITimerEventData { searchLength: number; unsortedResultDuration: number; @@ -209,6 +241,14 @@ export class OpenAnythingHandler extends QuickOpenHandler { files: fileModel.stats, }); + /* __GDPR__ + "openAnything" : { + "duration" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, + "${include}": [ + "${ITimerEventData}" + ] + } + */ this.telemetryService.publicLog('openAnything', objects.assign(data, { duration })); }); diff --git a/src/vs/workbench/parts/search/browser/patternInputWidget.ts b/src/vs/workbench/parts/search/browser/patternInputWidget.ts index 2f3509b593db1..e282dfcb60060 100644 --- a/src/vs/workbench/parts/search/browser/patternInputWidget.ts +++ b/src/vs/workbench/parts/search/browser/patternInputWidget.ts @@ -241,6 +241,9 @@ export class ExcludePatternInputWidget extends PatternInputWidget { title: nls.localize('useIgnoreFilesDescription', "Use Ignore Files"), isChecked: false, onChange: (viaKeyboard) => { + /* __GDPR__ + "search.useIgnoreFiles.toggled" : {} + */ this.telemetryService.publicLog('search.useIgnoreFiles.toggled'); this.onOptionChange(null); if (!viaKeyboard) { @@ -255,6 +258,9 @@ export class ExcludePatternInputWidget extends PatternInputWidget { title: nls.localize('useExcludeSettingsDescription', "Use Exclude Settings"), isChecked: false, onChange: (viaKeyboard) => { + /* __GDPR__ + "search.useExcludeSettings.toggled" : {} + */ this.telemetryService.publicLog('search.useExcludeSettings.toggled'); this.onOptionChange(null); if (!viaKeyboard) { diff --git a/src/vs/workbench/parts/search/browser/replaceService.ts b/src/vs/workbench/parts/search/browser/replaceService.ts index e4575c62f80f1..2a302d947ea66 100644 --- a/src/vs/workbench/parts/search/browser/replaceService.ts +++ b/src/vs/workbench/parts/search/browser/replaceService.ts @@ -137,6 +137,9 @@ export class ReplaceService implements IReplaceService { } public openReplacePreview(element: FileMatchOrMatch, preserveFocus?: boolean, sideBySide?: boolean, pinned?: boolean): TPromise { + /* __GDPR__ + "replace.open.previewEditor" : {} + */ this.telemetryService.publicLog('replace.open.previewEditor'); const fileMatch = element instanceof Match ? element.parent() : element; diff --git a/src/vs/workbench/parts/search/browser/searchActions.ts b/src/vs/workbench/parts/search/browser/searchActions.ts index 77af098c12ca7..9e9f3113d4796 100644 --- a/src/vs/workbench/parts/search/browser/searchActions.ts +++ b/src/vs/workbench/parts/search/browser/searchActions.ts @@ -549,6 +549,9 @@ export class ReplaceAllAction extends AbstractSearchAndReplaceAction { } public run(): TPromise { + /* __GDPR__ + "replaceAll.action.selected" : {} + */ this.telemetryService.publicLog('replaceAll.action.selected'); let nextFocusElement = this.getElementToFocusAfterRemoved(this.viewer, this.fileMatch); return this.fileMatch.parent().replace(this.fileMatch).then(() => { @@ -573,6 +576,9 @@ export class ReplaceAction extends AbstractSearchAndReplaceAction { public run(): TPromise { this.enabled = false; + /* __GDPR__ + "replace.action.selected" : {} + */ this.telemetryService.publicLog('replace.action.selected'); return this.element.parent().replace(this.element).then(() => { diff --git a/src/vs/workbench/parts/search/browser/searchViewlet.ts b/src/vs/workbench/parts/search/browser/searchViewlet.ts index 577a90f92ba7b..ec62e39262e94 100644 --- a/src/vs/workbench/parts/search/browser/searchViewlet.ts +++ b/src/vs/workbench/parts/search/browser/searchViewlet.ts @@ -853,6 +853,9 @@ export class SearchViewlet extends Viewlet { } public toggleQueryDetails(moveFocus?: boolean, show?: boolean, skipLayout?: boolean, reverse?: boolean): void { + /* __GDPR__ + "search.toggleQueryDetails" : {} + */ this.telemetryService.publicLog('search.toggleQueryDetails'); let cls = 'more'; @@ -1329,6 +1332,9 @@ export class SearchViewlet extends Viewlet { return TPromise.as(true); } + /* __GDPR__ + "searchResultChosen" : {} + */ this.telemetryService.publicLog('searchResultChosen'); return (this.viewModel.isReplaceActive() && !!this.viewModel.replaceString) ? diff --git a/src/vs/workbench/parts/search/common/searchModel.ts b/src/vs/workbench/parts/search/common/searchModel.ts index de3d6e7eee1b2..3152f36df332a 100644 --- a/src/vs/workbench/parts/search/common/searchModel.ts +++ b/src/vs/workbench/parts/search/common/searchModel.ts @@ -568,6 +568,11 @@ export class SearchResult extends Disposable { const promise = this.replaceService.replace(this.matches(), progressRunner); const + /* __GDPR__ + "replaceAll.started" : { + "duration" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" } + } + */ onDone(duration => this.telemetryService.publicLog('replaceAll.started', { duration })); return promise.then(() => { @@ -725,11 +730,21 @@ export class SearchModel extends Disposable { const progressEmitter = new Emitter(); const progressEmitter.event); const + /* __GDPR__ + "searchResultsFirstRender" : { + "duration" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" } + } + */ onFirstRenderStopwatch(duration => this.telemetryService.publicLog('searchResultsFirstRender', { duration })); const const start = Date.now(); + /* __GDPR__ + "searchResultsFinished" : { + "duration" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" } + } + */ onDoneStopwatch(duration => this.telemetryService.publicLog('searchResultsFinished', { duration })); const currentRequest = this.currentRequest; @@ -754,6 +769,15 @@ export class SearchModel extends Disposable { } const options: IPatternInfo = objects.assign({}, this._searchQuery.contentPattern); delete options.pattern; + /* __GDPR__ + "searchResultsShown" : { + "count" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "fileCount": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "options": { "${inline}": [ "${IPatternInfo}" ] }, + "duration": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, + "useRipgrep": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ this.telemetryService.publicLog('searchResultsShown', { count: this._searchResult.count(), fileCount: this._searchResult.fileCount(), diff --git a/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.ts b/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.ts index 483374be65fa7..55567eec11f45 100644 --- a/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.ts +++ b/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.ts @@ -88,6 +88,7 @@ class LanguageSurvey { const message = nls.localize('helpUs', "Help us improve our support for {0}", data.languageId); const takeSurveyAction = new Action('takeSurvey', nls.localize('takeShortSurvey', "Take Short Survey"), '', true, () => { + // __GDPR__TODO__ Need to move away from dynamic event names as those cannot be registered statically telemetryService.publicLog(`${data.surveyId}.survey/takeShortSurvey`); return telemetryService.getTelemetryInfo().then(info => { window.open(`${data.surveyUrl}?o=${encodeURIComponent(process.platform)}&v=${encodeURIComponent(pkg.version)}&m=${encodeURIComponent(info.machineId)}`); @@ -97,12 +98,14 @@ class LanguageSurvey { }); const remindMeLaterAction = new Action('later', nls.localize('remindLater', "Remind Me later"), '', true, () => { + // __GDPR__TODO__ Need to move away from dynamic event names as those cannot be registered statically telemetryService.publicLog(`${data.surveyId}.survey/remindMeLater`); storageService.store(SESSION_COUNT_KEY, sessionCount - 3, StorageScope.GLOBAL); return TPromise.as(null); }); const neverAgainAction = new Action('never', nls.localize('neverAgain', "Don't Show Again"), '', true, () => { + // __GDPR__TODO__ Need to move away from dynamic event names as those cannot be registered statically telemetryService.publicLog(`${data.surveyId}.survey/dontShowAgain`); storageService.store(IS_CANDIDATE_KEY, false, StorageScope.GLOBAL); storageService.store(SKIP_VERSION_KEY, pkg.version, StorageScope.GLOBAL); @@ -110,6 +113,7 @@ class LanguageSurvey { }); const actions = [neverAgainAction, remindMeLaterAction, takeSurveyAction]; + // __GDPR__TODO__ Need to move away from dynamic event names as those cannot be registered statically telemetryService.publicLog(`${data.surveyId}.survey/userAsked`); messageService.show(Severity.Info, { message, actions }); } diff --git a/src/vs/workbench/parts/tasks/common/taskSystem.ts b/src/vs/workbench/parts/tasks/common/taskSystem.ts index 50c34926ecfd2..e401c17265255 100644 --- a/src/vs/workbench/parts/tasks/common/taskSystem.ts +++ b/src/vs/workbench/parts/tasks/common/taskSystem.ts @@ -36,6 +36,16 @@ export class TaskError { } } +/* __GDPR__FRAGMENT__ + "TelemetryEvent" : { + "trigger" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "runner": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "taskKind": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "command": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "success": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "exitCode": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } +*/ export interface TelemetryEvent { // How the task got trigger. Is either shortcut or command trigger: string; diff --git a/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts b/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts index 14abad75cd50b..3d6b5ebfe854d 100644 --- a/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts +++ b/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts @@ -1098,6 +1098,11 @@ class TaskService extends EventEmitter implements ITaskService { let event: TaskCustomizationTelementryEvent = { properties: properties ? Object.getOwnPropertyNames(properties) : [] }; + /* __GDPR__ + "taskService.customize" : { + "properties" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ this.telemetryService.publicLog(TaskService.CustomizationTelemetryEventName, event); if (openConfig) { let resource = workspaceFolder.toResource('.vscode/tasks.json'); diff --git a/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.ts b/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.ts index 39b6e37ba0780..a7fed0b13a0a4 100644 --- a/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.ts +++ b/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.ts @@ -410,6 +410,13 @@ export class TerminalTaskSystem extends EventEmitter implements ITaskSystem { success: true, exitCode: summary.exitCode }; + /* __GDPR__ + "taskService" : { + "${include}": [ + "${TelemetryEvent}" + ] + } + */ this.telemetryService.publicLog(TerminalTaskSystem.TelemetryEventName, telemetryEvent); } catch (error) { } @@ -423,6 +430,13 @@ export class TerminalTaskSystem extends EventEmitter implements ITaskSystem { command: this.getSanitizedCommand(executedCommand), success: false }; + /* __GDPR__ + "taskService" : { + "${include}": [ + "${TelemetryEvent}" + ] + } + */ this.telemetryService.publicLog(TerminalTaskSystem.TelemetryEventName, telemetryEvent); } catch (error) { } diff --git a/src/vs/workbench/parts/tasks/node/processTaskSystem.ts b/src/vs/workbench/parts/tasks/node/processTaskSystem.ts index 6074ce58b460a..3a31c8ccac378 100644 --- a/src/vs/workbench/parts/tasks/node/processTaskSystem.ts +++ b/src/vs/workbench/parts/tasks/node/processTaskSystem.ts @@ -146,16 +146,37 @@ export class ProcessTaskSystem extends EventEmitter implements ITaskSystem { try { let result = this.doExecuteTask(task, telemetryEvent); result.promise = result.promise.then((success) => { + /* __GDPR__ + "taskService" : { + "${include}": [ + "${TelemetryEvent}" + ] + } + */ this.telemetryService.publicLog(ProcessTaskSystem.TelemetryEventName, telemetryEvent); return success; }, (err: any) => { telemetryEvent.success = false; + /* __GDPR__ + "taskService" : { + "${include}": [ + "${TelemetryEvent}" + ] + } + */ this.telemetryService.publicLog(ProcessTaskSystem.TelemetryEventName, telemetryEvent); return TPromise.wrapError(err); }); return result; } catch (err) { telemetryEvent.success = false; + /* __GDPR__ + "taskService" : { + "${include}": [ + "${TelemetryEvent}" + ] + } + */ this.telemetryService.publicLog(ProcessTaskSystem.TelemetryEventName, telemetryEvent); if (err instanceof TaskError) { throw err; diff --git a/src/vs/workbench/parts/trust/electron-browser/unsupportedWorkspaceSettings.contribution.ts b/src/vs/workbench/parts/trust/electron-browser/unsupportedWorkspaceSettings.contribution.ts index 8e68052288c59..21dbeb9472c6a 100644 --- a/src/vs/workbench/parts/trust/electron-browser/unsupportedWorkspaceSettings.contribution.ts +++ b/src/vs/workbench/parts/trust/electron-browser/unsupportedWorkspaceSettings.contribution.ts @@ -70,12 +70,18 @@ class UnsupportedWorkspaceSettingsContribution implements IWorkbenchContribution const message = nls.localize('unsupportedWorkspaceSettings', 'This Workspace contains settings that can only be set in User Settings. ({0})', unsupportedKeys.join(', ')); const openWorkspaceSettings = new Action('unsupportedWorkspaceSettings.openWorkspaceSettings', nls.localize('openWorkspaceSettings', 'Open Workspace Settings'), '', true, () => { + /* __GDPR__ + "workspace.settings.unsupported.review" : {} + */ this.telemetryService.publicLog('workspace.settings.unsupported.review'); this.rememberWarningWasShown(); return this.preferencesService.openWorkspaceSettings(); }); const openDocumentation = new Action('unsupportedWorkspaceSettings.openDocumentation', nls.localize('openDocumentation', 'Learn More'), '', true, () => { + /* __GDPR__ + "workspace.settings.unsupported.documentation" : {} + */ this.telemetryService.publicLog('workspace.settings.unsupported.documentation'); this.rememberWarningWasShown(); window.open('https://go.microsoft.com/fwlink/?linkid=839878'); // Don't change link. @@ -83,6 +89,9 @@ class UnsupportedWorkspaceSettingsContribution implements IWorkbenchContribution }); const close = new Action('unsupportedWorkspaceSettings.Ignore', nls.localize('ignore', 'Ignore'), '', true, () => { + /* __GDPR__ + "workspace.settings.unsupported.ignore" : {} + */ this.telemetryService.publicLog('workspace.settings.unsupported.ignore'); this.rememberWarningWasShown(); return TPromise.as(true); @@ -90,6 +99,9 @@ class UnsupportedWorkspaceSettingsContribution implements IWorkbenchContribution const actions = [openWorkspaceSettings, openDocumentation, close]; this.messageService.show(Severity.Warning, { message, actions }); + /* __GDPR__ + "workspace.settings.unsupported.warning" : {} + */ this.telemetryService.publicLog('workspace.settings.unsupported.warning'); } } diff --git a/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.ts b/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.ts index 90336d7e2fff2..93be1d9e53443 100644 --- a/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.ts +++ b/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.ts @@ -148,6 +148,32 @@ interface Strings { extensionNotFound: string; } +/* __GDPR__ + "installExtension" : { + "${include}": [ + "${WelcomePageInstall-1}" + ] + } +*/ +/* __GDPR__ + "installedExtension" : { + "${include}": [ + "${WelcomePageInstalled-1}", + "${WelcomePageInstalled-2}", + "${WelcomePageInstalled-3}", + "${WelcomePageInstalled-4}", + "${WelcomePageInstalled-5}", + "${WelcomePageInstalled-6}" + ] + } +*/ +/* __GDPR__ + "detailsExtension" : { + "${include}": [ + "${WelcomePageDetails-1}" + ] + } +*/ const extensionPackStrings: Strings = { installEvent: 'installExtension', installedEvent: 'installedExtension', @@ -159,6 +185,32 @@ const extensionPackStrings: Strings = { extensionNotFound: localize('welcomePage.extensionPackNotFound', "Support for {0} with id {1} could not be found."), }; +/* __GDPR__ + "installKeymap" : { + "${include}": [ + "${WelcomePageInstall-1}" + ] + } +*/ +/* __GDPR__ + "installedKeymap" : { + "${include}": [ + "${WelcomePageInstalled-1}", + "${WelcomePageInstalled-2}", + "${WelcomePageInstalled-3}", + "${WelcomePageInstalled-4}", + "${WelcomePageInstalled-5}", + "${WelcomePageInstalled-6}" + ] + } +*/ +/* __GDPR__ + "detailsKeymap" : { + "${include}": [ + "${WelcomePageDetails-1}" + ] + } +*/ const keymapStrings: Strings = { installEvent: 'installKeymap', installedEvent: 'installedKeymap', @@ -271,6 +323,12 @@ class WelcomePage { a.setAttribute('aria-label', localize('welcomePage.openFolderWithPath', "Open folder {0} with path {1}", name, tildifiedParentFolder)); a.href = 'javascript:void(0)'; a.addEventListener('click', e => { + /* __GDPR__ + "workbenchActionExecuted" : { + "id" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "from": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ this.telemetryService.publicLog('workbenchActionExecuted', { id: 'openRecentFolder', from: telemetryFrom @@ -350,6 +408,12 @@ class WelcomePage { } private installExtension(extensionSuggestion: ExtensionSuggestion, strings: Strings): void { + /* __GDPR__FRAGMENT__ + "WelcomePageInstall-1" : { + "from" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "extensionId": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ this.telemetryService.publicLog(strings.installEvent, { from: telemetryFrom, extensionId: extensionSuggestion.id, @@ -357,6 +421,13 @@ class WelcomePage { this.instantiationService.invokeFunction(getInstalledExtensions).then(extensions => { const installedExtension = arrays.first(extensions, extension => extension.identifier === extensionSuggestion.id); if (installedExtension && installedExtension.globallyEnabled) { + /* __GDPR__FRAGMENT__ + "WelcomePageInstalled-1" : { + "from" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "extensionId": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "outcome": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ this.telemetryService.publicLog(strings.installedEvent, { from: telemetryFrom, extensionId: extensionSuggestion.id, @@ -399,6 +470,13 @@ class WelcomePage { if (found) { return this.extensionEnablementService.setEnablement(extensionSuggestion.id, true) .then(() => { + /* __GDPR__FRAGMENT__ + "WelcomePageInstalled-2" : { + "from" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "extensionId": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "outcome": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ this.telemetryService.publicLog(strings.installedEvent, { from: telemetryFrom, extensionId: extensionSuggestion.id, @@ -407,6 +485,13 @@ class WelcomePage { return this.windowService.reloadWindow(); }); } else { + /* __GDPR__FRAGMENT__ + "WelcomePageInstalled-3" : { + "from" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "extensionId": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "outcome": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ this.telemetryService.publicLog(strings.installedEvent, { from: telemetryFrom, extensionId: extensionSuggestion.id, @@ -417,6 +502,14 @@ class WelcomePage { } }); }).then(null, err => { + /* __GDPR__FRAGMENT__ + "WelcomePageInstalled-4" : { + "from" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "extensionId": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "outcome": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "error": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" } + } + */ this.telemetryService.publicLog(strings.installedEvent, { from: telemetryFrom, extensionId: extensionSuggestion.id, @@ -428,6 +521,12 @@ class WelcomePage { return TPromise.as(true); }), new Action('details', localize('details', "Details"), null, true, () => { + /* __GDPR__FRAGMENT__ + "WelcomePageDetails-1" : { + "from" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "extensionId": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ this.telemetryService.publicLog(strings.detailsEvent, { from: telemetryFrom, extensionId: extensionSuggestion.id, @@ -438,6 +537,13 @@ class WelcomePage { return TPromise.as(false); }), new Action('cancel', localize('cancel', "Cancel"), null, true, () => { + /* __GDPR__FRAGMENT__ + "WelcomePageInstalled-5" : { + "from" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "extensionId": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "outcome": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ this.telemetryService.publicLog(strings.installedEvent, { from: telemetryFrom, extensionId: extensionSuggestion.id, @@ -448,6 +554,14 @@ class WelcomePage { ] }); }).then(null, err => { + /* __GDPR__FRAGMENT__ + "WelcomePageInstalled-6" : { + "from" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "extensionId": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "outcome": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "error": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" } + } + */ this.telemetryService.publicLog(strings.installedEvent, { from: telemetryFrom, extensionId: extensionSuggestion.id, diff --git a/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts b/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts index 65d4be0580dfd..3795d6aabd11c 100644 --- a/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts +++ b/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts @@ -178,6 +178,13 @@ export class WalkThroughPart extends BaseEditor { let baseElement = window.document.getElementsByTagName('base')[0] || window.location; if (baseElement && node.href.indexOf(baseElement.href) >= 0 && node.hash) { let scrollTarget = this.content.querySelector(node.hash); + /* __GDPR__ + "revealInDocument" : { + "hash" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "broken": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, + "from": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ this.telemetryService.publicLog('revealInDocument', { hash: node.hash, broken: !scrollTarget, @@ -209,6 +216,12 @@ export class WalkThroughPart extends BaseEditor { private open(uri: URI) { if (uri.scheme === 'http' || uri.scheme === 'https') { + /* __GDPR__ + "openExternal" : { + "uri" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "from": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ this.telemetryService.publicLog('openExternal', { uri: uri.toString(true), from: this.input instanceof WalkThroughInput ? this.input.getTelemetryFrom() : undefined @@ -341,6 +354,12 @@ export class WalkThroughPart extends BaseEditor { const div = innerContent.querySelector(`#${id.replace(/\./g, '\\.')}`) as HTMLElement; const options = this.getEditorOptions(snippet.textEditorModel.getModeId()); + /* __GDPR__FRAGMENT__ + "EditorTelemetryData" : { + "target" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "snippet": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ const telemetryData = { target: this.input instanceof WalkThroughInput ? this.input.getTelemetryFrom() : undefined, snippet: i @@ -389,6 +408,13 @@ export class WalkThroughPart extends BaseEditor { })); this.contentDisposables.push(once(editor.onMouseDown)(() => { + /* __GDPR__ + "walkThroughSnippetInteraction" : { + "from" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "type": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "snippet": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ this.telemetryService.publicLog('walkThroughSnippetInteraction', { from: this.input instanceof WalkThroughInput ? this.input.getTelemetryFrom() : undefined, type: 'mouseDown', @@ -396,6 +422,13 @@ export class WalkThroughPart extends BaseEditor { }); })); this.contentDisposables.push(once(editor.onKeyDown)(() => { + /* __GDPR__ + "walkThroughSnippetInteraction" : { + "from" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "type": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "snippet": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ this.telemetryService.publicLog('walkThroughSnippetInteraction', { from: this.input instanceof WalkThroughInput ? this.input.getTelemetryFrom() : undefined, type: 'keyDown', @@ -403,6 +436,13 @@ export class WalkThroughPart extends BaseEditor { }); })); this.contentDisposables.push(once(editor.onDidChangeModelContent)(() => { + /* __GDPR__ + "walkThroughSnippetInteraction" : { + "from" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "type": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "snippet": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ this.telemetryService.publicLog('walkThroughSnippetInteraction', { from: this.input instanceof WalkThroughInput ? this.input.getTelemetryFrom() : undefined, type: 'changeModelContent', diff --git a/src/vs/workbench/parts/welcome/walkThrough/node/walkThroughInput.ts b/src/vs/workbench/parts/welcome/walkThrough/node/walkThroughInput.ts index f99257555b658..98a5ffc7c8d6d 100644 --- a/src/vs/workbench/parts/welcome/walkThrough/node/walkThroughInput.ts +++ b/src/vs/workbench/parts/welcome/walkThrough/node/walkThroughInput.ts @@ -93,6 +93,12 @@ export class WalkThroughInput extends EditorInput { const descriptor = super.getTelemetryDescriptor(); descriptor['target'] = this.getTelemetryFrom(); descriptor['resource'] = telemetryURIDescriptor(this.options.resource); + /* __GDPR__FRAGMENT__ + "EditorTelemetryDescriptor" : { + "target" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "resource": { "${inline}": [ "${URIDescriptor}" ] } + } + */ return descriptor; } @@ -165,6 +171,11 @@ export class WalkThroughInput extends EditorInput { private resolveTelemetry() { if (!this.resolveTime) { this.resolveTime = Date.now(); + /* __GDPR__ + "resolvingInput" : { + "target" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ this.telemetryService.publicLog('resolvingInput', { target: this.getTelemetryFrom(), }); @@ -173,6 +184,15 @@ export class WalkThroughInput extends EditorInput { private disposeTelemetry(reason?: ShutdownReason) { if (this.resolveTime) { + /* __GDPR__ + "disposingInput" : { + "target" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "timeSpent": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, + "reason": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "maxTopScroll": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "maxBottomScroll": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ this.telemetryService.publicLog('disposingInput', { target: this.getTelemetryFrom(), timeSpent: (Date.now() - this.resolveTime) / 60, diff --git a/src/vs/workbench/services/contextview/electron-browser/contextmenuService.ts b/src/vs/workbench/services/contextview/electron-browser/contextmenuService.ts index 463e224cfd429..d6e303791af6e 100644 --- a/src/vs/workbench/services/contextview/electron-browser/contextmenuService.ts +++ b/src/vs/workbench/services/contextview/electron-browser/contextmenuService.ts @@ -111,6 +111,12 @@ export class ContextMenuService implements IContextMenuService { } private runAction(actionRunner: IActionRunner, actionToRun: IAction, delegate: IContextMenuDelegate, event: IEvent): void { + /* __GDPR__ + "workbenchActionExecuted" : { + "id" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "from": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ this.telemetryService.publicLog('workbenchActionExecuted', { id: actionToRun.id, from: 'contextMenu' }); const context = delegate.getActionsContext ? delegate.getActionsContext(event) : event; diff --git a/src/vs/workbench/services/extensions/electron-browser/extensionService.ts b/src/vs/workbench/services/extensions/electron-browser/extensionService.ts index e600bf32f9737..46852ac790765 100644 --- a/src/vs/workbench/services/extensions/electron-browser/extensionService.ts +++ b/src/vs/workbench/services/extensions/electron-browser/extensionService.ts @@ -300,6 +300,12 @@ export class ExtensionService implements IExtensionService { ...this._extensionEnablementService.getWorkspaceDisabledExtensions() ]; + /* __GDPR__ + "extensionsScanned" : { + "totalCount" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, + "disabledCount": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" } + } + */ this._telemetryService.publicLog('extensionsScanned', { totalCount: installedExtensions.length, disabledCount: disabledExtensions.length @@ -347,6 +353,14 @@ export class ExtensionService implements IExtensionService { if (!this._isDev && msg.extensionId) { const { type, extensionId, extensionPointId, message } = msg; + /* __GDPR__ + "extensionsMessage" : { + "type" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, + "extensionId": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, + "extensionPointId": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, + "message": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" } + } + */ this._telemetryService.publicLog('extensionsMessage', { type, extensionId, extensionPointId, message }); diff --git a/src/vs/workbench/services/keybinding/electron-browser/keybindingService.ts b/src/vs/workbench/services/keybinding/electron-browser/keybindingService.ts index 0e599328bf583..b4c10edb67891 100644 --- a/src/vs/workbench/services/keybinding/electron-browser/keybindingService.ts +++ b/src/vs/workbench/services/keybinding/electron-browser/keybindingService.ts @@ -318,6 +318,11 @@ export class WorkbenchKeybindingService extends AbstractKeybindingService { keybindingsTelemetry(telemetryService, this); let data = KeyboardMapperFactory.INSTANCE.getCurrentKeyboardLayout(); + /* __GDPR__ + "keyboardLayout" : { + "currentKeyboardLayout": { "${inline}": [ "${IKeyboardLayoutInfo}" ] } + } + */ telemetryService.publicLog('keyboardLayout', { currentKeyboardLayout: data }); @@ -405,6 +410,11 @@ export class WorkbenchKeybindingService extends AbstractKeybindingService { if (!isFirstTime) { let cnt = extraUserKeybindings.length; + /* __GDPR__ + "customKeybindingsChanged" : { + "keyCount" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ this.telemetryService.publicLog('customKeybindingsChanged', { keyCount: cnt }); diff --git a/src/vs/workbench/services/message/browser/messageList.ts b/src/vs/workbench/services/message/browser/messageList.ts index 154aca8ed0dc1..e1b5be6d5a61d 100644 --- a/src/vs/workbench/services/message/browser/messageList.ts +++ b/src/vs/workbench/services/message/browser/messageList.ts @@ -304,6 +304,12 @@ export class MessageList { DOM.EventHelper.stop(e, true); + /* __GDPR__ + "workbenchActionExecuted" : { + "id" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "from": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ this.telemetryService.publicLog('workbenchActionExecuted', { id: action.id, from: 'message' }); (action.run() || TPromise.as(null)) diff --git a/src/vs/workbench/services/telemetry/common/workspaceStats.ts b/src/vs/workbench/services/telemetry/common/workspaceStats.ts index 55ed3e778ec3b..5bdecfc2d372d 100644 --- a/src/vs/workbench/services/telemetry/common/workspaceStats.ts +++ b/src/vs/workbench/services/telemetry/common/workspaceStats.ts @@ -144,6 +144,34 @@ export class WorkspaceStats { return arr.some(v => v.search(regEx) > -1) || undefined; } + /* __GDPR__FRAGMENT__ + "WorkspaceTags" : { + "workbench.filesToOpen" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "workbench.filesToCreate" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "workbench.filesToDiff" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "workspace.roots" : { "classification": "CustomerContent", "purpose": "FeatureInsight" }, + "workspace.empty" : { "classification": "CustomerContent", "purpose": "FeatureInsight" }, + "workspace.grunt" : { "classification": "CustomerContent", "purpose": "FeatureInsight" }, + "workspace.gulp" : { "classification": "CustomerContent", "purpose": "FeatureInsight" }, + "workspace.jake" : { "classification": "CustomerContent", "purpose": "FeatureInsight" }, + "workspace.tsconfig" : { "classification": "CustomerContent", "purpose": "FeatureInsight" }, + "workspace.jsconfig" : { "classification": "CustomerContent", "purpose": "FeatureInsight" }, + "workspace.config.xml" : { "classification": "CustomerContent", "purpose": "FeatureInsight" }, + "workspace.vsc.extension" : { "classification": "CustomerContent", "purpose": "FeatureInsight" }, + "workspace.ASP5" : { "classification": "CustomerContent", "purpose": "FeatureInsight" }, + "workspace.sln" : { "classification": "CustomerContent", "purpose": "FeatureInsight" }, + "workspace.unity" : { "classification": "CustomerContent", "purpose": "FeatureInsight" }, + "workspace.npm" : { "classification": "CustomerContent", "purpose": "FeatureInsight" }, + "workspace.bower" : { "classification": "CustomerContent", "purpose": "FeatureInsight" }, + "workspace.yeoman.code.ext" : { "classification": "CustomerContent", "purpose": "FeatureInsight" }, + "workspace.cordova.high" : { "classification": "CustomerContent", "purpose": "FeatureInsight" }, + "workspace.cordova.low" : { "classification": "CustomerContent", "purpose": "FeatureInsight" }, + "workspace.xamarin.android" : { "classification": "CustomerContent", "purpose": "FeatureInsight" }, + "workspace.xamarin.ios" : { "classification": "CustomerContent", "purpose": "FeatureInsight" }, + "workspace.android.cpp" : { "classification": "CustomerContent", "purpose": "FeatureInsight" }, + "workspace.reactNative" : { "classification": "CustomerContent", "purpose": "FeatureInsight" } + } + */ private getWorkspaceTags(configuration: IWindowConfiguration): TPromise { const tags: Tags = Object.create(null); @@ -245,6 +273,13 @@ export class WorkspaceStats { public reportWorkspaceTags(configuration: IWindowConfiguration): void { this.getWorkspaceTags(configuration).then((tags) => { + /* __GDPR__ + "workspce.tags" : { + "${include}": [ + "${WorkspaceTags}" + ] + } + */ this.telemetryService.publicLog('workspce.tags', tags); }, error => onUnexpectedError(error)); } @@ -261,6 +296,11 @@ export class WorkspaceStats { const set = domains.reduce((set, list) => list.reduce((set, item) => set.add(item), set), new Set()); const list: string[] = []; set.forEach(item => list.push(item)); + /* __GDPR__ + "workspace.remotes" : { + "domains" : { "classification": "CustomerContent", "purpose": "FeatureInsight" } + } + */ this.telemetryService.publicLog('workspace.remotes', { domains: list.sort() }); }, onUnexpectedError); } @@ -273,9 +313,21 @@ export class WorkspaceStats { content => getHashedRemotes(content.value), err => [] // ignore missing or binary file ); - })).then(hashedRemotes => this.telemetryService.publicLog('workspace.hashedRemotes', { remotes: hashedRemotes }), onUnexpectedError); + })).then(hashedRemotes => { + /* __GDPR__ + "workspace.hashedRemotes" : { + "remotes" : { "classification": "CustomerContent", "purpose": "FeatureInsight" } + } + */ + this.telemetryService.publicLog('workspace.hashedRemotes', { remotes: hashedRemotes }); + }, onUnexpectedError); } + /* __GDPR__FRAGMENT__ + "AzureTags" : { + "node" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ private reportAzureNode(workspaceUris: URI[], tags: Tags): TPromise { // TODO: should also work for `node_modules` folders several levels down const uris = workspaceUris.map(workspaceUri => { @@ -296,6 +348,12 @@ export class WorkspaceStats { }); } + + /* __GDPR__FRAGMENT__ + "AzureTags" : { + "java" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ private reportAzureJava(workspaceUris: URI[], tags: Tags): TPromise { return TPromise.join(workspaceUris.map(workspaceUri => { const path = workspaceUri.path; @@ -318,6 +376,13 @@ export class WorkspaceStats { return this.reportAzureJava(uris, tags); }).then((tags) => { if (Object.keys(tags).length) { + /* __GDPR__ + "workspace.azure" : { + "${include}": [ + "${AzureTags}" + ] + } + */ this.telemetryService.publicLog('workspace.azure', tags); } }).then(null, onUnexpectedError); diff --git a/src/vs/workbench/services/textfile/common/textFileEditorModel.ts b/src/vs/workbench/services/textfile/common/textFileEditorModel.ts index 6fbdcf7a435fd..3267637c435d6 100644 --- a/src/vs/workbench/services/textfile/common/textFileEditorModel.ts +++ b/src/vs/workbench/services/textfile/common/textFileEditorModel.ts @@ -366,7 +366,13 @@ export class TextFileEditorModel extends BaseTextEditorModel implements ITextFil private loadWithContent(content: IRawTextContent | IContent, backup?: URI): TPromise { diag('load() - resolved content', this.resource, new Date()); - // Telemetry + /* __GDPR__ + "fileGet" : { + "mimeType" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "ext": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "path": { "classification": "CustomerContent", "purpose": "FeatureInsight" } + } + */ this.telemetryService.publicLog('fileGet', { mimeType: guessMimeTypes(this.resource.fsPath).join(', '), ext: paths.extname(this.resource.fsPath), path: anonymize(this.resource.fsPath) }); // Update our resolved disk stat model @@ -698,8 +704,17 @@ export class TextFileEditorModel extends BaseTextEditorModel implements ITextFil // Telemetry if (this.isSettingsFile()) { + /* __GDPR__ + "settingsWritten" : {} + */ this.telemetryService.publicLog('settingsWritten'); // Do not log write to user settings.json and .vscode folder as a filePUT event as it ruins our JSON usage data } else { + /* __GDPR__ + "filePUT" : { + "mimeType" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "ext": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ this.telemetryService.publicLog('filePUT', { mimeType: guessMimeTypes(this.resource.fsPath).join(', '), ext: paths.extname(this.lastResolvedDiskStat.resource.fsPath) }); } diff --git a/src/vs/workbench/services/textfile/common/textFileService.ts b/src/vs/workbench/services/textfile/common/textFileService.ts index e754ef1bf389f..5dfbcde38a913 100644 --- a/src/vs/workbench/services/textfile/common/textFileService.ts +++ b/src/vs/workbench/services/textfile/common/textFileService.ts @@ -87,6 +87,13 @@ export abstract class TextFileService implements ITextFileService { this.onConfigurationChange(configuration); + /* __GDPR__ + "autoSave" : { + "${include}": [ + "${IAutoSaveConfiguration}" + ] + } + */ this.telemetryService.publicLog('autoSave', this.getAutoSaveConfiguration()); this.registerListeners(); @@ -211,6 +218,13 @@ export abstract class TextFileService implements ITextFileService { } // Telemetry + /* __GDPR__ + "hotExit:triggered" : { + "reason" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "windowCount": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "fileCount": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ this.telemetryService.publicLog('hotExit:triggered', { reason, windowCount, fileCount: dirtyToBackup.length }); // Backup diff --git a/src/vs/workbench/services/textfile/common/textfiles.ts b/src/vs/workbench/services/textfile/common/textfiles.ts index fc5bb023221e9..3a649cade6e7d 100644 --- a/src/vs/workbench/services/textfile/common/textfiles.ts +++ b/src/vs/workbench/services/textfile/common/textfiles.ts @@ -100,6 +100,13 @@ export interface IResult { success?: boolean; } +/* __GDPR__FRAGMENT__ + "IAutoSaveConfiguration" : { + "autoSaveDelay" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "autoSaveFocusChange": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "autoSaveApplicationChange": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } +*/ export interface IAutoSaveConfiguration { autoSaveDelay: number; autoSaveFocusChange: boolean; diff --git a/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.ts b/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.ts index 41aae76275dda..7fb9b9a90c8d9 100644 --- a/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.ts +++ b/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.ts @@ -642,6 +642,15 @@ export class WorkbenchThemeService implements IWorkbenchThemeService { if (themeData) { let key = themeType + themeData.extensionId; if (!this.themeExtensionsActivated.get(key)) { + /* __GDPR__ + "activatePlugin" : { + "id" : { "classification": "PublicNonPersonalData", "purpose": "FeatureInsight" }, + "name": { "classification": "PublicNonPersonalData", "purpose": "FeatureInsight" }, + "isBuiltin": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "publisherDisplayName": { "classification": "PublicPersonalData", "purpose": "FeatureInsight" }, + "themeId": { "classification": "PublicNonPersonalData", "purpose": "FeatureInsight" } + } + */ this.telemetryService.publicLog('activatePlugin', { id: themeData.extensionId, name: themeData.extensionName, diff --git a/src/vs/workbench/services/timer/common/timerService.ts b/src/vs/workbench/services/timer/common/timerService.ts index a337b25bf2764..0eecf662452e5 100644 --- a/src/vs/workbench/services/timer/common/timerService.ts +++ b/src/vs/workbench/services/timer/common/timerService.ts @@ -8,6 +8,14 @@ import { createDecorator } from 'vs/platform/instantiation/common/instantiation' export const ITimerService = createDecorator('timerService'); +/* __GDPR__FRAGMENT__ + "IMemoryInfo" : { + "workingSetSize" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, + "peakWorkingSetSize": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, + "privateBytes": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, + "sharedBytes": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" } + } +*/ export interface IMemoryInfo { workingSetSize: number; peakWorkingSetSize: number; @@ -15,6 +23,41 @@ export interface IMemoryInfo { sharedBytes: number; } +/* __GDPR__FRAGMENT__ + "IStartupMetrics" : { + "version" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, + "ellapsed" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, + "timers.ellapsedAppReady" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, + "timers.ellapsedWindowLoad" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, + "timers.ellapsedWindowLoadToRequire" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, + "timers.ellapsedExtensions" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, + "timers.ellapsedExtensionsReady" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, + "timers.ellapsedRequire" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, + "timers.ellapsedViewletRestore" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, + "timers.ellapsedEditorRestore" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, + "timers.ellapsedWorkbench" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, + "timers.ellapsedTimersToTimersComputed" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, + "platform" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, + "release" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, + "arch" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, + "totalmem" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, + "meminfo" : { "${inline}": [ "${IMemoryInfo}" ] }, + "cpus.count" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, + "cpus.speed" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, + "cpus.model" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, + "initialStartup" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, + "hasAccessibilitySupport" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, + "isVMLikelyhood" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, + "emptyWorkbench" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, + "loadavg" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" }, + "${wildcard}": [ + { + "${prefix}": "timers2.", + "${classification}": { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" } + } + ] + } +*/ export interface IStartupMetrics { version: number; ellapsed: number;