Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Commit

Permalink
telemetry.ts: send telemetry only if aiKey is not an empty string(#3091)
Browse files Browse the repository at this point in the history
  • Loading branch information
hyangah authored Mar 11, 2020
1 parent eae5825 commit 330f08c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/telemetry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 330f08c

Please sign in to comment.