Skip to content

Commit 9cf86a4

Browse files
committed
Adds setting to explicitly control telemetry
Disables zone.js monkey patching by application insights
1 parent 4eb1c3e commit 9cf86a4

File tree

4 files changed

+12
-1
lines changed

4 files changed

+12
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,7 @@ GitLens is highly customizable and provides many configuration settings to allow
305305
|Name | Description
306306
|-----|------------
307307
|`gitlens.advanced.toggleWhitespace.enabled`|Specifies whether or not to toggle whitespace off then showing blame annotations (*may* be required by certain fonts/themes)
308+
|`gitlens.advanced.telemetry.enabled`|Specifies whether or not to enable GitLens telemetry (even if enabled still abides by the overall `telemetry.enableTelemetry` setting
308309
|`gitlens.advanced.menus`|Specifies which commands will be added to which menus
309310
|`gitlens.advanced.caching.enabled`|Specifies whether git output will be cached
310311
|`gitlens.advanced.caching.maxLines`|Specifies the threshold for caching larger documents

package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -691,6 +691,11 @@
691691
"default": true,
692692
"description": "Specifies whether or not to close the QuickPick menu when focus is lost"
693693
},
694+
"gitlens.advanced.telemetry.enabled": {
695+
"type": "boolean",
696+
"default": true,
697+
"description": "Specifies whether or not to enable GitLens telemetry (even if enabled still abides by the overall `telemetry.enableTelemetry` setting"
698+
},
694699
"gitlens.advanced.toggleWhitespace.enabled": {
695700
"type": "boolean",
696701
"default": false,

src/configuration.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,9 @@ export interface IAdvancedConfig {
9898
quickPick: {
9999
closeOnFocusOut: boolean;
100100
};
101+
telemetry: {
102+
enabled: boolean;
103+
};
101104
toggleWhitespace: {
102105
enabled: boolean;
103106
};

src/telemetry.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
'use strict';
22
import { Disposable, env, version, workspace } from 'vscode';
3+
import { ExtensionKey, IConfig } from './configuration';
34
import * as os from 'os';
45

56
let _reporter: TelemetryReporter;
67

78
export class Telemetry extends Disposable {
89

910
static configure(key: string) {
10-
if (!workspace.getConfiguration('telemetry').get<boolean>('enableTelemetry', true)) return;
11+
const cfg = workspace.getConfiguration().get<IConfig>(ExtensionKey)!;
12+
if (!cfg.advanced.telemetry.enabled || !workspace.getConfiguration('telemetry').get<boolean>('enableTelemetry', true)) return;
1113

1214
_reporter = new TelemetryReporter(key);
1315
}

0 commit comments

Comments
 (0)