Skip to content

Commit

Permalink
Fix missing client telemetry
Browse files Browse the repository at this point in the history
  • Loading branch information
code-asher committed May 7, 2024
1 parent 2633bca commit c62a553
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions patches/telemetry.diff
Expand Up @@ -144,3 +144,38 @@ Index: code-server/lib/vscode/src/vs/platform/product/common/product.ts
});
}

Index: code-server/lib/vscode/src/vs/workbench/services/telemetry/browser/telemetryService.ts
===================================================================
--- code-server.orig/lib/vscode/src/vs/workbench/services/telemetry/browser/telemetryService.ts
+++ code-server/lib/vscode/src/vs/workbench/services/telemetry/browser/telemetryService.ts
@@ -67,21 +67,19 @@ export class TelemetryService extends Di
productService: IProductService,
remoteAgentService: IRemoteAgentService
) {
- const telemetrySupported = supportsTelemetry(productService, environmentService) && productService.aiConfig?.ariaKey;
+ const telemetrySupported = supportsTelemetry(productService, environmentService);
if (telemetrySupported && getTelemetryLevel(configurationService) !== TelemetryLevel.NONE && this.impl === NullTelemetryService) {
// If remote server is present send telemetry through that, else use the client side appender
const appenders: ITelemetryAppender[] = [];
const isInternal = isInternalTelemetry(productService, configurationService);
- if (!isLoggingOnly(productService, environmentService)) {
- if (remoteAgentService.getConnection() !== null) {
- const remoteTelemetryProvider = {
- log: remoteAgentService.logTelemetry.bind(remoteAgentService),
- flush: remoteAgentService.flushTelemetry.bind(remoteAgentService)
- };
- appenders.push(remoteTelemetryProvider);
- } else {
- appenders.push(new OneDataSystemWebAppender(isInternal, 'monacoworkbench', null, productService.aiConfig?.ariaKey));
- }
+ if (remoteAgentService.getConnection() !== null) {
+ const remoteTelemetryProvider = {
+ log: remoteAgentService.logTelemetry.bind(remoteAgentService),
+ flush: remoteAgentService.flushTelemetry.bind(remoteAgentService)
+ };
+ appenders.push(remoteTelemetryProvider);
+ } else if (!isLoggingOnly(productService, environmentService) && productService.aiConfig?.ariaKey) {
+ appenders.push(new OneDataSystemWebAppender(isInternal, 'monacoworkbench', null, productService.aiConfig?.ariaKey));
}
appenders.push(new TelemetryLogAppender(logService, loggerService, environmentService, productService));
const config: ITelemetryServiceConfig = {

0 comments on commit c62a553

Please sign in to comment.