shared process - also log if window visible

This commit is contained in:
Benjamin Pasero 2021-03-24 08:08:07 +01:00
parent 5245290dc5
commit 90484dda2b
No known key found for this signature in database
GPG key ID: E6380CC4C8219E65
2 changed files with 11 additions and 1 deletions

View file

@ -954,12 +954,18 @@ export class CodeApplication extends Disposable {
type SharedProcessErrorClassification = {
type: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth', isMeasurement: true };
reason: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth', isMeasurement: true };
visible: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth', isMeasurement: true };
};
type SharedProcessErrorEvent = {
type: WindowError;
reason: string | undefined;
visible: boolean;
};
telemetryService.publicLog2<SharedProcessErrorEvent, SharedProcessErrorClassification>('sharedprocesserror', { type, reason: typeof details !== 'string' ? details?.reason : undefined });
telemetryService.publicLog2<SharedProcessErrorEvent, SharedProcessErrorClassification>('sharedprocesserror', {
type,
reason: typeof details !== 'string' ? details?.reason : undefined,
visible: sharedProcess.isVisible()
});
}));
// Windows: install mutex

View file

@ -251,4 +251,8 @@ export class SharedProcess extends Disposable implements ISharedProcess {
this.window.webContents.openDevTools();
}
}
isVisible(): boolean {
return this.window?.isVisible() ?? false;
}
}