From 2c15c09fc0e7a083f75ecc303184d7c49c6111c0 Mon Sep 17 00:00:00 2001 From: Asher Date: Wed, 6 Nov 2019 13:44:13 -0600 Subject: [PATCH] Add missing telemetry option --- src/browser/client.ts | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/browser/client.ts b/src/browser/client.ts index 47d70baa..f21b4708 100644 --- a/src/browser/client.ts +++ b/src/browser/client.ts @@ -1,8 +1,11 @@ import { Emitter } from "vs/base/common/event"; import { URI } from "vs/base/common/uri"; +import { localize } from "vs/nls"; +import { Extensions, IConfigurationRegistry } from "vs/platform/configuration/common/configurationRegistry"; import { registerSingleton } from "vs/platform/instantiation/common/extensions"; import { ServiceCollection } from "vs/platform/instantiation/common/serviceCollection"; import { ILocalizationsService } from "vs/platform/localizations/common/localizations"; +import { Registry } from "vs/platform/registry/common/platform"; import { PersistentConnectionEventType } from "vs/platform/remote/common/remoteAgentConnection"; import { ITelemetryService } from "vs/platform/telemetry/common/telemetry"; import { coderApi, vscodeApi } from "vs/server/src/browser/api"; @@ -22,6 +25,23 @@ class TelemetryService extends TelemetryChannelClient { } } +const TELEMETRY_SECTION_ID = "telemetry"; + +Registry.as(Extensions.Configuration).registerConfiguration({ + "id": TELEMETRY_SECTION_ID, + "order": 110, + "type": "object", + "title": localize("telemetryConfigurationTitle", "Telemetry"), + "properties": { + "telemetry.enableTelemetry": { + "type": "boolean", + "description": localize("telemetry.enableTelemetry", "Enable usage data and errors to be sent to a Microsoft online service."), + "default": true, + "tags": ["usesOnlineServices"] + } + } +}); + class NodeProxyService extends NodeProxyChannelClient implements INodeProxyService { private readonly _onClose = new Emitter(); public readonly onClose = this._onClose.event;