1
1
import { Emitter } from "vs/base/common/event" ;
2
2
import { URI } from "vs/base/common/uri" ;
3
+ import { localize } from "vs/nls" ;
4
+ import { Extensions , IConfigurationRegistry } from "vs/platform/configuration/common/configurationRegistry" ;
3
5
import { registerSingleton } from "vs/platform/instantiation/common/extensions" ;
4
6
import { ServiceCollection } from "vs/platform/instantiation/common/serviceCollection" ;
5
7
import { ILocalizationsService } from "vs/platform/localizations/common/localizations" ;
8
+ import { Registry } from "vs/platform/registry/common/platform" ;
6
9
import { PersistentConnectionEventType } from "vs/platform/remote/common/remoteAgentConnection" ;
7
10
import { ITelemetryService } from "vs/platform/telemetry/common/telemetry" ;
8
11
import { coderApi , vscodeApi } from "vs/server/src/browser/api" ;
@@ -22,6 +25,23 @@ class TelemetryService extends TelemetryChannelClient {
22
25
}
23
26
}
24
27
28
+ const TELEMETRY_SECTION_ID = "telemetry" ;
29
+
30
+ Registry . as < IConfigurationRegistry > ( Extensions . Configuration ) . registerConfiguration ( {
31
+ "id" : TELEMETRY_SECTION_ID ,
32
+ "order" : 110 ,
33
+ "type" : "object" ,
34
+ "title" : localize ( "telemetryConfigurationTitle" , "Telemetry" ) ,
35
+ "properties" : {
36
+ "telemetry.enableTelemetry" : {
37
+ "type" : "boolean" ,
38
+ "description" : localize ( "telemetry.enableTelemetry" , "Enable usage data and errors to be sent to a Microsoft online service." ) ,
39
+ "default" : true ,
40
+ "tags" : [ "usesOnlineServices" ]
41
+ }
42
+ }
43
+ } ) ;
44
+
25
45
class NodeProxyService extends NodeProxyChannelClient implements INodeProxyService {
26
46
private readonly _onClose = new Emitter < void > ( ) ;
27
47
public readonly onClose = this . _onClose . event ;
0 commit comments