From 034a01c7d1320b303c70dff79ced7f30a9ba511c Mon Sep 17 00:00:00 2001 From: Eric Amodio Date: Wed, 17 May 2017 00:35:30 -0400 Subject: [PATCH] Turns off console hijacking by appinsights --- src/telemetry.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/telemetry.ts b/src/telemetry.ts index a049af6..330938e 100644 --- a/src/telemetry.ts +++ b/src/telemetry.ts @@ -1,6 +1,5 @@ 'use strict'; import { env, Disposable, version, workspace } from 'vscode'; -import { ExtensionKey } from './constants'; import * as os from 'os'; let _reporter: TelemetryReporter; @@ -9,7 +8,6 @@ export class Telemetry extends Disposable { static configure(key: string) { if (!workspace.getConfiguration('telemetry').get('enableTelemetry', true)) return; - if (workspace.getConfiguration(ExtensionKey).get('debug')) return; _reporter = new TelemetryReporter(key); } @@ -34,7 +32,10 @@ export class TelemetryReporter { private _context: { [key: string]: string }; constructor(key: string) { + const diagChannelState = process.env['APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL']; + process.env['APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL'] = true; this.appInsights = require('applicationinsights') as ApplicationInsights; + process.env['APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL'] = diagChannelState; if (this.appInsights.client) { this._client = this.appInsights.getClient(key);