mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-23 19:59:37 +00:00
Always log on tsserver exits (#156495)
This ensures we also log if the TS Server exits with no code but a valid signal. Useful for figuring out how many users are hitting OOM errors
This commit is contained in:
@@ -431,24 +431,22 @@ export default class TypeScriptServiceClient extends Disposable implements IType
|
||||
|
||||
handle.onExit((data: TypeScriptServerExitEvent) => {
|
||||
const { code, signal } = data;
|
||||
if (code === null || typeof code === 'undefined') {
|
||||
this.info(`TSServer exited. Signal: ${signal}`);
|
||||
} else {
|
||||
// In practice, the exit code is an integer with no ties to any identity,
|
||||
// so it can be classified as SystemMetaData, rather than CallstackOrException.
|
||||
this.error(`TSServer exited with code: ${code}. Signal: ${signal}`);
|
||||
/* __GDPR__
|
||||
"tsserver.exitWithCode" : {
|
||||
"owner": "mjbvz",
|
||||
"code" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" },
|
||||
"signal" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" },
|
||||
"${include}": [
|
||||
"${TypeScriptCommonProperties}"
|
||||
]
|
||||
}
|
||||
*/
|
||||
this.logTelemetry('tsserver.exitWithCode', { code, signal: signal ?? undefined });
|
||||
}
|
||||
this.error(`TSServer exited. Code: ${code}. Signal: ${signal}`);
|
||||
|
||||
// In practice, the exit code is an integer with no ties to any identity,
|
||||
// so it can be classified as SystemMetaData, rather than CallstackOrException.
|
||||
/* __GDPR__
|
||||
"tsserver.exitWithCode" : {
|
||||
"owner": "mjbvz",
|
||||
"code" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" },
|
||||
"signal" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" },
|
||||
"${include}": [
|
||||
"${TypeScriptCommonProperties}"
|
||||
]
|
||||
}
|
||||
*/
|
||||
this.logTelemetry('tsserver.exitWithCode', { code: code ?? undefined, signal: signal ?? undefined });
|
||||
|
||||
|
||||
if (this.token !== mytoken) {
|
||||
// this is coming from an old process
|
||||
|
||||
Reference in New Issue
Block a user