mirror of
https://github.com/microsoft/vscode.git
synced 2026-09-14 07:12:00 +01:00
Support proxies in the telemetry service (#187952)
This commit is contained in:
@@ -192,7 +192,8 @@ class CliMain extends Disposable {
|
||||
services.set(IUriIdentityService, new UriIdentityService(fileService));
|
||||
|
||||
// Request
|
||||
services.set(IRequestService, new SyncDescriptor(RequestService, undefined, true));
|
||||
const requestService = new RequestService(configurationService, environmentService, logService, loggerService);
|
||||
services.set(IRequestService, requestService);
|
||||
|
||||
// Download Service
|
||||
services.set(IDownloadService, new SyncDescriptor(DownloadService, undefined, true));
|
||||
@@ -212,7 +213,7 @@ class CliMain extends Disposable {
|
||||
const isInternal = isInternalTelemetry(productService, configurationService);
|
||||
if (supportsTelemetry(productService, environmentService)) {
|
||||
if (productService.aiConfig && productService.aiConfig.ariaKey) {
|
||||
appenders.push(new OneDataSystemAppender(isInternal, 'monacoworkbench', null, productService.aiConfig.ariaKey));
|
||||
appenders.push(new OneDataSystemAppender(requestService, isInternal, 'monacoworkbench', null, productService.aiConfig.ariaKey));
|
||||
}
|
||||
|
||||
const config: ITelemetryServiceConfig = {
|
||||
|
||||
@@ -251,7 +251,8 @@ class SharedProcessMain extends Disposable {
|
||||
services.set(IUriIdentityService, uriIdentityService);
|
||||
|
||||
// Request
|
||||
services.set(IRequestService, new RequestChannelClient(mainProcessService.getChannel('request')));
|
||||
const requestService = new RequestChannelClient(mainProcessService.getChannel('request'));
|
||||
services.set(IRequestService, requestService);
|
||||
|
||||
// Checksum
|
||||
services.set(IChecksumService, new SyncDescriptor(ChecksumService, undefined, false /* proxied to other processes */));
|
||||
@@ -279,7 +280,7 @@ class SharedProcessMain extends Disposable {
|
||||
const logAppender = new TelemetryLogAppender(logService, loggerService, environmentService, productService);
|
||||
appenders.push(logAppender);
|
||||
if (productService.aiConfig?.ariaKey) {
|
||||
const collectorAppender = new OneDataSystemAppender(internalTelemetry, 'monacoworkbench', null, productService.aiConfig.ariaKey);
|
||||
const collectorAppender = new OneDataSystemAppender(requestService, internalTelemetry, 'monacoworkbench', null, productService.aiConfig.ariaKey);
|
||||
this._register(toDisposable(() => collectorAppender.flush())); // Ensure the 1DS appender is disposed so that it flushes remaining data
|
||||
appenders.push(collectorAppender);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user