Skip to content

Commit 11447aa

Browse files
committed
fixup! fix: patch telemetry
1 parent 304ae2d commit 11447aa

File tree

1 file changed

+4
-20
lines changed

1 file changed

+4
-20
lines changed

patches/telemetry.diff

+4-20
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ Index: code-server/lib/vscode/src/vs/server/node/serverServices.ts
99
import { REMOTE_FILE_SYSTEM_CHANNEL_NAME } from 'vs/workbench/services/remote/common/remoteFileSystemProviderClient';
1010
import { ExtensionHostStatusService, IExtensionHostStatusService } from 'vs/server/node/extensionHostStatusService';
1111
+import { TelemetryClient } from "vs/server/node/telemetryClient";
12-
12+
1313
const eventPrefix = 'monacoworkbench';
14-
14+
1515
@@ -120,7 +121,11 @@ export async function setupServerService
1616
let appInsightsAppender: ITelemetryAppender = NullAppender;
1717
const machineId = await getMachineId();
@@ -181,26 +181,10 @@ Index: code-server/lib/vscode/src/vs/workbench/services/telemetry/browser/teleme
181181
===================================================================
182182
--- code-server.orig/lib/vscode/src/vs/workbench/services/telemetry/browser/telemetryService.ts
183183
+++ code-server/lib/vscode/src/vs/workbench/services/telemetry/browser/telemetryService.ts
184-
@@ -25,6 +25,7 @@ class WebAppInsightsAppender implements
185-
private _telemetryCache: { eventName: string; data: any }[] = [];
186-
187-
constructor(private _eventPrefix: string, aiKey: string) {
188-
+ console.log("halp")
189-
const endpointUrl = 'https://vortex.data.microsoft.com/collect/v1';
190-
import('@microsoft/applicationinsights-web').then(aiLibrary => {
191-
this._aiClient = new aiLibrary.ApplicationInsights({
192-
@@ -74,6 +75,7 @@ class WebAppInsightsAppender implements
193-
data = { ...data.properties, ...data.measurements };
194-
195-
// undefined assertion is ok since above two if statements cover both cases
196-
+ console.log("are we here maybe?")
197-
this._aiClient!.trackEvent({ name: this._eventPrefix + '/' + eventName }, data);
198-
}
199-
200-
@@ -119,16 +121,19 @@ export class TelemetryService extends Di
184+
@@ -119,16 +119,19 @@ export class TelemetryService extends Di
201185
) {
202186
super();
203-
187+
204188
- if (supportsTelemetry(productService, environmentService) && productService.aiConfig?.asimovKey) {
205189
+ if (supportsTelemetry(productService, environmentService)) {
206190
// If remote server is present send telemetry through that, else use the client side appender

0 commit comments

Comments
 (0)