improve pii path logic

This commit is contained in:
SteVen Batten
2022-02-23 09:32:13 -08:00
parent 78a9a54d38
commit b43fff4d34
6 changed files with 17 additions and 13 deletions

View File

@@ -43,7 +43,7 @@ import { RequestService } from 'vs/platform/request/node/requestService';
import { resolveCommonProperties } from 'vs/platform/telemetry/common/commonProperties';
import { ITelemetryService, machineIdKey } from 'vs/platform/telemetry/common/telemetry';
import { ITelemetryServiceConfig, TelemetryService } from 'vs/platform/telemetry/common/telemetryService';
import { supportsTelemetry, NullTelemetryService } from 'vs/platform/telemetry/common/telemetryUtils';
import { supportsTelemetry, NullTelemetryService, getPiiPathsFromEnvironment } from 'vs/platform/telemetry/common/telemetryUtils';
import { AppInsightsAppender } from 'vs/platform/telemetry/node/appInsightsAppender';
import { buildTelemetryMessage } from 'vs/platform/telemetry/node/telemetry';
import { IUriIdentityService } from 'vs/platform/uriIdentity/common/uriIdentity';
@@ -156,7 +156,7 @@ class CliMain extends Disposable {
appenders.push(new AppInsightsAppender('monacoworkbench', null, productService.aiConfig.asimovKey));
}
const { appRoot, extensionsPath, installSourcePath } = environmentService;
const { installSourcePath } = environmentService;
const config: ITelemetryServiceConfig = {
appenders,
@@ -174,7 +174,7 @@ class CliMain extends Disposable {
return resolveCommonProperties(fileService, release(), hostname(), process.arch, productService.commit, productService.version, machineId, productService.msftInternalDomains, installSourcePath);
})(),
piiPaths: [appRoot, extensionsPath]
piiPaths: getPiiPathsFromEnvironment(environmentService)
};
services.set(ITelemetryService, new SyncDescriptor(TelemetryService, [config]));