Skip to content

Commit

Permalink
Added telemetry opt-out (#266)
Browse files Browse the repository at this point in the history
  • Loading branch information
MitchellSternke authored Nov 4, 2016
1 parent 2034244 commit 8683148
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/models/telemetry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ export namespace Telemetry {
*/
export function initialize(context: vscode.ExtensionContext): void {
if (typeof reporter === 'undefined') {
// Check if the user has opted out of telemetry
if (!vscode.workspace.getConfiguration('telemetry').get<boolean>('enableTelemetry', true)) {
disable();
return;
}

let packageInfo = Utils.getPackageInfo(context);
reporter = new TelemetryReporter('vscode-mssql', packageInfo.version, packageInfo.aiKey);
}
Expand Down

0 comments on commit 8683148

Please sign in to comment.