Add missing telemetry option

This commit is contained in:
Asher 2019-11-06 13:44:13 -06:00
parent 2ad2582cc0
commit 2c15c09fc0
No known key found for this signature in database
GPG Key ID: D63C1EF81242354A
1 changed files with 20 additions and 0 deletions

View File

@ -1,8 +1,11 @@
import { Emitter } from "vs/base/common/event"; import { Emitter } from "vs/base/common/event";
import { URI } from "vs/base/common/uri"; 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 { registerSingleton } from "vs/platform/instantiation/common/extensions";
import { ServiceCollection } from "vs/platform/instantiation/common/serviceCollection"; import { ServiceCollection } from "vs/platform/instantiation/common/serviceCollection";
import { ILocalizationsService } from "vs/platform/localizations/common/localizations"; 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 { PersistentConnectionEventType } from "vs/platform/remote/common/remoteAgentConnection";
import { ITelemetryService } from "vs/platform/telemetry/common/telemetry"; import { ITelemetryService } from "vs/platform/telemetry/common/telemetry";
import { coderApi, vscodeApi } from "vs/server/src/browser/api"; import { coderApi, vscodeApi } from "vs/server/src/browser/api";
@ -22,6 +25,23 @@ class TelemetryService extends TelemetryChannelClient {
} }
} }
const TELEMETRY_SECTION_ID = "telemetry";
Registry.as<IConfigurationRegistry>(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 { class NodeProxyService extends NodeProxyChannelClient implements INodeProxyService {
private readonly _onClose = new Emitter<void>(); private readonly _onClose = new Emitter<void>();
public readonly onClose = this._onClose.event; public readonly onClose = this._onClose.event;