diff --git a/src/standardLanguageClient.ts b/src/standardLanguageClient.ts index 2eaed4fbd..aebeee951 100644 --- a/src/standardLanguageClient.ts +++ b/src/standardLanguageClient.ts @@ -343,16 +343,22 @@ export class StandardLanguageClient { } else if (e.name === Telemetry.LS_ERROR) { const tags = []; const exception: string = e?.properties.exception; + const message: string = e?.properties.message; if (exception !== undefined) { if (exception.includes("dtree.ObjectNotFoundException")) { tags.push("dtree.ObjectNotFoundException"); } - - if (tags.length > 0) { - e.properties['tags'] = tags; - return Telemetry.sendTelemetry(Telemetry.LS_ERROR, e.properties); + } + if (message !== undefined) { + if (message.includes("workspace exited with unsaved changes")) { + tags.push("workspace-exited-unsaved-changes"); } } + + if (tags.length > 0) { + e.properties['tags'] = tags; + return Telemetry.sendTelemetry(Telemetry.LS_ERROR, e.properties); + } } });