Initial Strict Typing Support for Telemetry Events (#75785)

* Added command line information to display details about collected telemetry

* Telemetry tooling exploration

* Changing telemetry calls to be strongly typed

* Fixed an event definition

* Removed telemetry command

* More removing of telemetry command

* Fixed compilation errors

* Forgotten property

* Updated typings so diff was aligned
This commit is contained in:
Logan Ramos
2019-07-01 14:37:43 -07:00
committed by GitHub
parent 71bd9c68e6
commit 26d0bbd5d9
25 changed files with 199 additions and 256 deletions

View File

@@ -1709,14 +1709,13 @@ export class WindowsManager extends Disposable 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 });
type WindowErrorClassification = {
type: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth', isMeasurement: true };
};
type WindowErrorEvent = {
type: WindowError;
};
this.telemetryService.publicLog2<WindowErrorEvent, WindowErrorClassification>('windowerror', { type: error });
// Unresponsive
if (error === WindowError.UNRESPONSIVE) {
if (window.isExtensionDevelopmentHost || window.isExtensionTestHost || (window.win && window.win.webContents && window.win.webContents.isDevToolsOpened())) {