Dispose telemetry wrapper on deactivation. (#455)

* Dispose telemetry wrapper on deactivation.

* Wait to complete the dispose.
This commit is contained in:
Yan Zhang 2018-10-09 13:35:11 +08:00 committed by GitHub
parent 9619db035e
commit 067d21cc3a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1144 additions and 1143 deletions

2282
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -3,7 +3,7 @@
import * as path from "path"; import * as path from "path";
import * as vscode from "vscode"; import * as vscode from "vscode";
import { initializeFromJsonFile, instrumentOperation } from "vscode-extension-telemetry-wrapper"; import { dispose as disposeTelemetryWrapper, initializeFromJsonFile, instrumentOperation } from "vscode-extension-telemetry-wrapper";
import * as commands from "./commands"; import * as commands from "./commands";
import { JavaDebugConfigurationProvider } from "./configurationProvider"; import { JavaDebugConfigurationProvider } from "./configurationProvider";
import { HCR_EVENT, JAVA_LANGID, USER_NOTIFICATION_EVENT } from "./constants"; import { HCR_EVENT, JAVA_LANGID, USER_NOTIFICATION_EVENT } from "./constants";
@ -66,7 +66,8 @@ function initializeExtension(operationId: string, context: vscode.ExtensionConte
} }
// this method is called when your extension is deactivated // this method is called when your extension is deactivated
export function deactivate() { export async function deactivate() {
await disposeTelemetryWrapper();
} }
function handleUserNotification(customEvent) { function handleUserNotification(customEvent) {