From d7f82c11d667d0c86e8d6965c9474d34d111d7ad Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Fri, 16 Nov 2018 10:32:53 +0100 Subject: [PATCH] log telemetry event when we report unresponsiveness and crash, aftermath for #62970 and #62829 --- src/vs/code/electron-main/windows.ts | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/vs/code/electron-main/windows.ts b/src/vs/code/electron-main/windows.ts index 1b27914ba10..3e313bfa1ef 100644 --- a/src/vs/code/electron-main/windows.ts +++ b/src/vs/code/electron-main/windows.ts @@ -39,9 +39,9 @@ import { getComparisonKey, isEqual, normalizePath } from 'vs/base/common/resourc import { endsWith } from 'vs/base/common/strings'; import { getRemoteAuthority } from 'vs/platform/remote/common/remoteHosts'; -enum WindowError { - UNRESPONSIVE, - CRASHED +const enum WindowError { + UNRESPONSIVE = 1, + CRASHED = 2 } interface INewWindowState extends ISingleWindowState { @@ -162,7 +162,7 @@ export class WindowsManager implements IWindowsMainService { @IEnvironmentService private environmentService: IEnvironmentService, @ILifecycleService private lifecycleService: ILifecycleService, @IBackupMainService private backupMainService: IBackupMainService, - @ITelemetryService telemetryService: ITelemetryService, + @ITelemetryService private telemetryService: ITelemetryService, @IConfigurationService private configurationService: IConfigurationService, @IHistoryMainService private historyMainService: IHistoryMainService, @IWorkspacesMainService private workspacesMainService: IWorkspacesMainService, @@ -1641,6 +1641,13 @@ export class WindowsManager implements IWindowsMainService { private onWindowError(window: ICodeWindow, error: WindowError): void { this.logService.error(error === WindowError.CRASHED ? '[VS Code]: render process crashed!' : '[VS Code]: detected unresponsive'); + /* __GDPR__ + "windowerror" : { + "type" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth", "isMeasurement": true }, + } + */ + this.telemetryService.publicLog('windowerror', { type: error }); + // Unresponsive if (error === WindowError.UNRESPONSIVE) { this.dialogs.showMessageBox({ -- GitLab