mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-27 20:13:32 +01:00
Move appenders to be better controlled by services (#133465)
* Cleanup telemetry appenders to be owned by service * Add telemetry level to services * simplify * Fix compile * Rename supportsTelemetryLogging -> supportsTelemetry Co-authored-by: SteVen Batten <sbatten@microsoft.com>
This commit is contained in:
@@ -14,9 +14,9 @@ import { getServiceMachineId } from 'vs/platform/serviceMachineId/common/service
|
||||
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
|
||||
import { isWeb } from 'vs/base/common/platform';
|
||||
import { ILogService } from 'vs/platform/log/common/log';
|
||||
import { getTelemetryConfiguration, getTelemetryLevel } from 'vs/platform/telemetry/common/telemetryUtils';
|
||||
import { getTelemetryLevel, supportsTelemetry } from 'vs/platform/telemetry/common/telemetryUtils';
|
||||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||
import { TelemetryConfiguration, TelemetryLevel } from 'vs/platform/telemetry/common/telemetry';
|
||||
import { TelemetryLevel } from 'vs/platform/telemetry/common/telemetry';
|
||||
|
||||
class ExtensionResourceLoaderService implements IExtensionResourceLoaderService {
|
||||
|
||||
@@ -52,7 +52,7 @@ class ExtensionResourceLoaderService implements IExtensionResourceLoaderService
|
||||
'X-Client-Name': `${this._productService.applicationName}${isWeb ? '-web' : ''}`,
|
||||
'X-Client-Version': this._productService.version
|
||||
};
|
||||
if (getTelemetryLevel(this._productService, this._environmentService) >= TelemetryLevel.USER && getTelemetryConfiguration(this._configurationService) === TelemetryConfiguration.ON) {
|
||||
if (supportsTelemetry(this._productService, this._environmentService) && getTelemetryLevel(this._configurationService) === TelemetryLevel.USAGE) {
|
||||
requestInit.headers['X-Machine-Id'] = machineId;
|
||||
}
|
||||
if (this._productService.commit) {
|
||||
|
||||
Reference in New Issue
Block a user