Skip to content

Commit

Permalink
Add tag property to better track kinds of stacktrace errors of interest.
Browse files Browse the repository at this point in the history
Signed-off-by: Roland Grunberg <rgrunber@redhat.com>
  • Loading branch information
rgrunber committed Jul 23, 2024
1 parent 7350e2c commit e3602eb
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/standardLanguageClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -340,9 +340,17 @@ export class StandardLanguageClient {
if (e.name === Telemetry.SERVER_INITIALIZED_EVT) {
return Telemetry.sendTelemetry(Telemetry.STARTUP_EVT, e.properties);
} else if (e.name === Telemetry.LS_ERROR) {
const tags = [];
const exception: string = e?.properties.exception;
if (exception !== undefined && exception.includes("dtree.ObjectNotFoundException")) {
return Telemetry.sendTelemetry(Telemetry.LS_ERROR, e.properties);
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);
}
}
}
});
Expand Down

0 comments on commit e3602eb

Please sign in to comment.