File tree Expand file tree Collapse file tree 1 file changed +2
-19
lines changed
extensions/ql-vscode/src/common/vscode Expand file tree Collapse file tree 1 file changed +2
-19
lines changed Original file line number Diff line number Diff line change 33 Extension ,
44 ExtensionContext ,
55 ConfigurationChangeEvent ,
6+ env ,
67} from "vscode" ;
78import TelemetryReporter from "vscode-extension-telemetry" ;
89import {
@@ -224,7 +225,7 @@ export class ExtensionTelemetryListener
224225 // if global telemetry is disabled, avoid showing the dialog or making any changes
225226 let result = undefined ;
226227 if (
227- isGlobalTelemetryEnabled ( ) &&
228+ env . isTelemetryEnabled &&
228229 // Avoid showing the dialog if we are in integration test mode.
229230 ! isIntegrationTestMode ( )
230231 ) {
@@ -297,21 +298,3 @@ export async function initializeTelemetry(
297298 ctx . subscriptions . push ( telemetryListener ) ;
298299 return telemetryListener ;
299300}
300-
301- function isGlobalTelemetryEnabled ( ) : boolean {
302- // If "enableTelemetry" is set to false, no telemetry will be sent regardless of the value of "telemetryLevel"
303- const enableTelemetry : boolean | undefined =
304- GLOBAL_ENABLE_TELEMETRY . getValue ( ) ;
305- if ( enableTelemetry === false ) {
306- return false ;
307- }
308-
309- // If a value for "telemetry.telemetryLevel" is provided, then use that
310- const telemetryLevel : string | undefined = GLOBAL_TELEMETRY_LEVEL . getValue ( ) ;
311- if ( telemetryLevel !== undefined ) {
312- return telemetryLevel !== "off" ;
313- }
314-
315- // Otherwise fall back to the deprecated "telemetry.enableTelemetry" setting
316- return ! ! enableTelemetry ;
317- }
You can’t perform that action at this time.
0 commit comments