mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-19 16:18:58 +01:00
centralize telemetry level (#131919)
* centralize telemetry level * add comments and const enum
This commit is contained in:
@@ -68,7 +68,7 @@ import { resolveCommonProperties } from 'vs/platform/telemetry/common/commonProp
|
||||
import { ITelemetryService, machineIdKey } from 'vs/platform/telemetry/common/telemetry';
|
||||
import { TelemetryAppenderClient } from 'vs/platform/telemetry/common/telemetryIpc';
|
||||
import { ITelemetryServiceConfig, TelemetryService } from 'vs/platform/telemetry/common/telemetryService';
|
||||
import { NullTelemetryService } from 'vs/platform/telemetry/common/telemetryUtils';
|
||||
import { NullTelemetryService, getTelemetryLevel, TelemetryLevel } from 'vs/platform/telemetry/common/telemetryUtils';
|
||||
import { IUpdateService } from 'vs/platform/update/common/update';
|
||||
import { UpdateChannel } from 'vs/platform/update/common/updateIpc';
|
||||
import { DarwinUpdateService } from 'vs/platform/update/electron-main/updateService.darwin';
|
||||
@@ -531,7 +531,7 @@ export class CodeApplication extends Disposable {
|
||||
services.set(IURLService, new SyncDescriptor(NativeURLService));
|
||||
|
||||
// Telemetry
|
||||
if (!this.environmentMainService.isExtensionDevelopment && !this.environmentMainService.args['disable-telemetry'] && !!this.productService.enableTelemetry) {
|
||||
if (getTelemetryLevel(this.productService, this.environmentMainService) === TelemetryLevel.USER) {
|
||||
const channel = getDelayedChannel(sharedProcessReady.then(client => client.getChannel('telemetryAppender')));
|
||||
const appender = new TelemetryAppenderClient(channel);
|
||||
const commonProperties = resolveCommonProperties(this.fileService, release(), hostname(), process.arch, this.productService.commit, this.productService.version, machineId, this.productService.msftInternalDomains, this.environmentMainService.installSourcePath);
|
||||
|
||||
Reference in New Issue
Block a user