From 330f08ca9833221619433286d0cc89cfb43c512a Mon Sep 17 00:00:00 2001 From: Hyang-Ah Hana Kim Date: Wed, 11 Mar 2020 12:32:52 -0400 Subject: [PATCH] telemetry.ts: send telemetry only if aiKey is not an empty string(#3091) --- src/telemetry.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/telemetry.ts b/src/telemetry.ts index 5f789aad3..b06ae390f 100644 --- a/src/telemetry.ts +++ b/src/telemetry.ts @@ -183,6 +183,9 @@ function sendTelemetryEvent( properties?: { [key: string]: string }, measures?: { [key: string]: number } ): void { + if (!aiKey) { + return; // cannot enable telemetry + } telemtryReporter = telemtryReporter ? telemtryReporter : new TelemetryReporter(extensionId, extensionVersion, aiKey);