mirror of
https://github.com/ckaczor/vscode-gitlens.git
synced 2026-01-16 01:25:42 -05:00
Adds setting to explicitly control telemetry
Disables zone.js monkey patching by application insights
This commit is contained in:
@@ -98,6 +98,9 @@ export interface IAdvancedConfig {
|
||||
quickPick: {
|
||||
closeOnFocusOut: boolean;
|
||||
};
|
||||
telemetry: {
|
||||
enabled: boolean;
|
||||
};
|
||||
toggleWhitespace: {
|
||||
enabled: boolean;
|
||||
};
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
'use strict';
|
||||
import { Disposable, env, version, workspace } from 'vscode';
|
||||
import { ExtensionKey, IConfig } from './configuration';
|
||||
import * as os from 'os';
|
||||
|
||||
let _reporter: TelemetryReporter;
|
||||
@@ -7,7 +8,8 @@ let _reporter: TelemetryReporter;
|
||||
export class Telemetry extends Disposable {
|
||||
|
||||
static configure(key: string) {
|
||||
if (!workspace.getConfiguration('telemetry').get<boolean>('enableTelemetry', true)) return;
|
||||
const cfg = workspace.getConfiguration().get<IConfig>(ExtensionKey)!;
|
||||
if (!cfg.advanced.telemetry.enabled || !workspace.getConfiguration('telemetry').get<boolean>('enableTelemetry', true)) return;
|
||||
|
||||
_reporter = new TelemetryReporter(key);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user