Skip to content

Commit e3602eb

Browse files
committed
Add tag property to better track kinds of stacktrace errors of interest.
Signed-off-by: Roland Grunberg <[email protected]>
1 parent 7350e2c commit e3602eb

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/standardLanguageClient.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -340,9 +340,17 @@ export class StandardLanguageClient {
340340
if (e.name === Telemetry.SERVER_INITIALIZED_EVT) {
341341
return Telemetry.sendTelemetry(Telemetry.STARTUP_EVT, e.properties);
342342
} else if (e.name === Telemetry.LS_ERROR) {
343+
const tags = [];
343344
const exception: string = e?.properties.exception;
344-
if (exception !== undefined && exception.includes("dtree.ObjectNotFoundException")) {
345-
return Telemetry.sendTelemetry(Telemetry.LS_ERROR, e.properties);
345+
if (exception !== undefined) {
346+
if (exception.includes("dtree.ObjectNotFoundException")) {
347+
tags.push("dtree.ObjectNotFoundException");
348+
}
349+
350+
if (tags.length > 0) {
351+
e.properties['tags'] = tags;
352+
return Telemetry.sendTelemetry(Telemetry.LS_ERROR, e.properties);
353+
}
346354
}
347355
}
348356
});

0 commit comments

Comments
 (0)