@@ -40,7 +40,7 @@ Index: code-server/lib/vscode/src/vs/server/node/serverServices.ts
40
40
const isInternal = isInternalTelemetry(productService, configurationService);
41
41
if (supportsTelemetry(productService, environmentService)) {
42
42
- if (!isLoggingOnly(productService, environmentService) && productService.aiConfig?.ariaKey) {
43
- + const telemetryEndpoint = process.env.CS_TELEMETRY_URL || "https://v1.telemetry.coder.com/track" ;
43
+ + const telemetryEndpoint = productService.telemetryEndpoint ;
44
44
+ if (telemetryEndpoint) {
45
45
+ oneDsAppender = new OneDataSystemAppender(requestService, false, eventPrefix, null, () => new TelemetryClient(telemetryEndpoint, isContainer));
46
46
+ } else if (!isLoggingOnly(productService, environmentService) && productService.aiConfig?.ariaKey) {
@@ -109,11 +109,38 @@ Index: code-server/lib/vscode/src/vs/server/node/webClientServer.ts
109
109
===================================================================
110
110
--- code-server.orig/lib/vscode/src/vs/server/node/webClientServer.ts
111
111
+++ code-server/lib/vscode/src/vs/server/node/webClientServer.ts
112
- @@ -318,6 +318,7 @@ export class WebClientServer {
112
+ @@ -318,6 +318,8 @@ export class WebClientServer {
113
113
scope: vscodeBase + '/',
114
114
path: base + '/_static/out/browser/serviceWorker.js',
115
115
},
116
116
+ enableTelemetry: this._productService.enableTelemetry,
117
+ + telemetryEndpoint: this._productService.telemetryEndpoint,
117
118
embedderIdentifier: 'server-distro',
118
119
extensionsGallery: this._productService.extensionsGallery,
119
120
};
121
+ Index: code-server/lib/vscode/src/vs/base/common/product.ts
122
+ ===================================================================
123
+ --- code-server.orig/lib/vscode/src/vs/base/common/product.ts
124
+ +++ code-server/lib/vscode/src/vs/base/common/product.ts
125
+ @@ -64,6 +64,7 @@ export interface IProductConfiguration {
126
+ readonly path: string;
127
+ readonly scope: string;
128
+ }
129
+ + readonly telemetryEndpoint?: string
130
+
131
+ readonly version: string;
132
+ readonly date?: string;
133
+ Index: code-server/lib/vscode/src/vs/platform/product/common/product.ts
134
+ ===================================================================
135
+ --- code-server.orig/lib/vscode/src/vs/platform/product/common/product.ts
136
+ +++ code-server/lib/vscode/src/vs/platform/product/common/product.ts
137
+ @@ -55,7 +55,8 @@ else if (globalThis._VSCODE_PRODUCT_JSON
138
+ resourceUrlTemplate: "https://open-vsx.org/vscode/asset/{publisher}/{name}/{version}/Microsoft.VisualStudio.Code.WebResources/{path}",
139
+ controlUrl: "",
140
+ recommendationsUrl: "",
141
+ - })
142
+ + }),
143
+ + telemetryEndpoint: env.CS_TELEMETRY_URL || product.telemetryEndpoint || "https://v1.telemetry.coder.com/track",
144
+ });
145
+ }
146
+
0 commit comments