Skip to content

Commit 3464a3c

Browse files
committed
(maint) Update telemetry to v0.1.2
This commit udpates the telemetry package to 0.1.2 as well as adding the exception method to the reporter class.
1 parent c08df15 commit 3464a3c

File tree

4 files changed

+76
-19
lines changed

4 files changed

+76
-19
lines changed

package-lock.json

Lines changed: 67 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,7 @@
570570
"viz.js": "~1.7.0",
571571
"vscode-debugadapter": "^1.19.0",
572572
"vscode-debugprotocol": "^1.19.0",
573-
"vscode-extension-telemetry": "0.1.1",
573+
"vscode-extension-telemetry": "0.1.2",
574574
"vscode-languageclient": "^5.2.1",
575575
"axios": "0.19.0"
576576
}

src/handler.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,12 @@ export abstract class ConnectionHandler {
6262
reason => {
6363
this.setConnectionStatus('Starting error', ConnectionStatus.Starting);
6464
this.languageClient.error(reason);
65+
reporter.sendTelemetryException(reason);
6566
},
6667
)
67-
.catch(() => {
68+
.catch((reason) => {
6869
this.setConnectionStatus('Failure', ConnectionStatus.Failed);
70+
reporter.sendTelemetryException(reason);
6971
});
7072
this.setConnectionStatus('Initialization Complete', ConnectionStatus.InitializationComplete);
7173

src/telemetry/typings/vscode-extension-telemetry.d.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ declare module 'vscode-extension-telemetry' {
66
properties?: { [key: string]: string },
77
measures?: { [key: string]: number }
88
): void;
9+
sendTelemetryException(
10+
error: Error,
11+
properties?: { [key: string]: string;},
12+
measurements?: { [key: string]: number; }
13+
): void;
914
dispose(); // tslint:disable-line
1015
}
1116
}

0 commit comments

Comments
 (0)