Skip to content

Commit ea07ad3

Browse files
authored
Disable querying usage data on terminating non-java sessions (#616)
Signed-off-by: Yan Zhang <yanzh@microsoft.com>
1 parent 1726e70 commit ea07ad3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/extension.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@ function initializeExtension(operationId: string, context: vscode.ExtensionConte
2424
});
2525

2626
const measureKeys = ["duration"];
27-
vscode.debug.onDidTerminateDebugSession(() => {
27+
vscode.debug.onDidTerminateDebugSession((e) => {
28+
if (e.type !== "java") {
29+
return;
30+
}
2831
fetchUsageData().then((ret) => {
2932
if (Array.isArray(ret) && ret.length) {
3033
ret.forEach((entry) => {

0 commit comments

Comments
 (0)