diff --git a/build/.moduleignore b/build/.moduleignore index e40224556c6..32fb3bd21c5 100644 --- a/build/.moduleignore +++ b/build/.moduleignore @@ -20,6 +20,15 @@ fsevents/test/** @vscode/spdlog/*.yml !@vscode/spdlog/build/Release/*.node +@vscode/deviceid/binding.gyp +@vscode/deviceid/build/** +@vscode/deviceid/deps/** +@vscode/deviceid/src/** +@vscode/deviceid/test/** +@vscode/deviceid/*.yml +!@vscode/deviceid/build/Release/*.node + + @vscode/sqlite3/binding.gyp @vscode/sqlite3/benchmark/** @vscode/sqlite3/cloudformation/** diff --git a/src/vs/base/node/id.ts b/src/vs/base/node/id.ts index 5f0fb74aefd..043731f666d 100644 --- a/src/vs/base/node/id.ts +++ b/src/vs/base/node/id.ts @@ -115,7 +115,7 @@ export async function getSqmMachineId(errorLogger: (error: any) => void): Promis return ''; } -export async function getVSDeviceId(errorLogger: (error: any) => void): Promise { +export async function getdevDeviceId(errorLogger: (error: any) => void): Promise { try { const deviceIdPackage = await import('@vscode/deviceid'); const id = await deviceIdPackage.getDeviceId(); diff --git a/src/vs/base/test/node/id.test.ts b/src/vs/base/test/node/id.test.ts index 3c733d92989..1a629134f06 100644 --- a/src/vs/base/test/node/id.test.ts +++ b/src/vs/base/test/node/id.test.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import * as assert from 'assert'; -import { getMachineId, getSqmMachineId, getVSDeviceId } from 'vs/base/node/id'; +import { getMachineId, getSqmMachineId, getdevDeviceId } from 'vs/base/node/id'; import { getMac } from 'vs/base/node/macAddress'; import { flakySuite } from 'vs/base/test/node/testUtils'; import { ensureNoDisposablesAreLeakedInTestSuite } from 'vs/base/test/common/utils'; @@ -26,9 +26,9 @@ flakySuite('ID', () => { assert.strictEqual(errors.length, 0); }); - test('getVSDeviceId', async function () { + test('getdevDeviceId', async function () { const errors = []; - const id = await getVSDeviceId(err => errors.push(err)); + const id = await getdevDeviceId(err => errors.push(err)); assert.ok(typeof id === 'string'); assert.strictEqual(errors.length, 0); }); diff --git a/src/vs/code/electron-main/app.ts b/src/vs/code/electron-main/app.ts index a56ef86fb2f..46193cdbe97 100644 --- a/src/vs/code/electron-main/app.ts +++ b/src/vs/code/electron-main/app.ts @@ -105,7 +105,7 @@ import { ExtensionsScannerService } from 'vs/platform/extensionManagement/node/e import { UserDataProfilesHandler } from 'vs/platform/userDataProfile/electron-main/userDataProfilesHandler'; import { ProfileStorageChangesListenerChannel } from 'vs/platform/userDataProfile/electron-main/userDataProfileStorageIpc'; import { Promises, RunOnceScheduler, runWhenGlobalIdle } from 'vs/base/common/async'; -import { resolveMachineId, resolveSqmId, resolveVSDeviceId } from 'vs/platform/telemetry/electron-main/telemetryUtils'; +import { resolveMachineId, resolveSqmId, resolvedevDeviceId } from 'vs/platform/telemetry/electron-main/telemetryUtils'; import { ExtensionsProfileScannerService } from 'vs/platform/extensionManagement/node/extensionsProfileScannerService'; import { LoggerChannel } from 'vs/platform/log/electron-main/logIpc'; import { ILoggerMainService } from 'vs/platform/log/electron-main/loggerService'; @@ -611,18 +611,18 @@ export class CodeApplication extends Disposable { // Resolve unique machine ID this.logService.trace('Resolving machine identifier...'); - const [machineId, sqmId, vsDeviceId] = await Promise.all([ + const [machineId, sqmId, devDeviceId] = await Promise.all([ resolveMachineId(this.stateService, this.logService), resolveSqmId(this.stateService, this.logService), - resolveVSDeviceId(this.stateService, this.logService) + resolvedevDeviceId(this.stateService, this.logService) ]); this.logService.trace(`Resolved machine identifier: ${machineId}`); // Shared process - const { sharedProcessReady, sharedProcessClient } = this.setupSharedProcess(machineId, sqmId, vsDeviceId); + const { sharedProcessReady, sharedProcessClient } = this.setupSharedProcess(machineId, sqmId, devDeviceId); // Services - const appInstantiationService = await this.initServices(machineId, sqmId, vsDeviceId, sharedProcessReady); + const appInstantiationService = await this.initServices(machineId, sqmId, devDeviceId, sharedProcessReady); // Auth Handler this._register(appInstantiationService.createInstance(ProxyAuthHandler)); @@ -987,8 +987,8 @@ export class CodeApplication extends Disposable { return false; } - private setupSharedProcess(machineId: string, sqmId: string, vsDeviceId: string): { sharedProcessReady: Promise; sharedProcessClient: Promise } { - const sharedProcess = this._register(this.mainInstantiationService.createInstance(SharedProcess, machineId, sqmId, vsDeviceId)); + private setupSharedProcess(machineId: string, sqmId: string, devDeviceId: string): { sharedProcessReady: Promise; sharedProcessClient: Promise } { + const sharedProcess = this._register(this.mainInstantiationService.createInstance(SharedProcess, machineId, sqmId, devDeviceId)); this._register(sharedProcess.onDidCrash(() => this.windowsMainService?.sendToFocused('vscode:reportSharedProcessCrash'))); @@ -1011,7 +1011,7 @@ export class CodeApplication extends Disposable { return { sharedProcessReady, sharedProcessClient }; } - private async initServices(machineId: string, sqmId: string, vsDeviceId: string, sharedProcessReady: Promise): Promise { + private async initServices(machineId: string, sqmId: string, devDeviceId: string, sharedProcessReady: Promise): Promise { const services = new ServiceCollection(); // Update @@ -1034,7 +1034,7 @@ export class CodeApplication extends Disposable { } // Windows - services.set(IWindowsMainService, new SyncDescriptor(WindowsMainService, [machineId, sqmId, vsDeviceId, this.userEnv], false)); + services.set(IWindowsMainService, new SyncDescriptor(WindowsMainService, [machineId, sqmId, devDeviceId, this.userEnv], false)); services.set(IAuxiliaryWindowsMainService, new SyncDescriptor(AuxiliaryWindowsMainService, undefined, false)); // Dialogs @@ -1114,7 +1114,7 @@ export class CodeApplication extends Disposable { const isInternal = isInternalTelemetry(this.productService, this.configurationService); const channel = getDelayedChannel(sharedProcessReady.then(client => client.getChannel('telemetryAppender'))); const appender = new TelemetryAppenderClient(channel); - const commonProperties = resolveCommonProperties(release(), hostname(), process.arch, this.productService.commit, this.productService.version, machineId, sqmId, vsDeviceId, isInternal); + const commonProperties = resolveCommonProperties(release(), hostname(), process.arch, this.productService.commit, this.productService.version, machineId, sqmId, devDeviceId, isInternal); const piiPaths = getPiiPathsFromEnvironment(this.environmentMainService); const config: ITelemetryServiceConfig = { appenders: [appender], commonProperties, piiPaths, sendErrorTelemetry: true }; diff --git a/src/vs/code/node/cliProcessMain.ts b/src/vs/code/node/cliProcessMain.ts index 62974272d38..2c1d7afc54c 100644 --- a/src/vs/code/node/cliProcessMain.ts +++ b/src/vs/code/node/cliProcessMain.ts @@ -57,7 +57,7 @@ import { IUriIdentityService } from 'vs/platform/uriIdentity/common/uriIdentity' import { UriIdentityService } from 'vs/platform/uriIdentity/common/uriIdentityService'; import { IUserDataProfile, IUserDataProfilesService } from 'vs/platform/userDataProfile/common/userDataProfile'; import { UserDataProfilesReadonlyService } from 'vs/platform/userDataProfile/node/userDataProfile'; -import { resolveMachineId, resolveSqmId, resolveVSDeviceId } from 'vs/platform/telemetry/node/telemetryUtils'; +import { resolveMachineId, resolveSqmId, resolvedevDeviceId } from 'vs/platform/telemetry/node/telemetryUtils'; import { ExtensionsProfileScannerService } from 'vs/platform/extensionManagement/node/extensionsProfileScannerService'; import { LogService } from 'vs/platform/log/common/logService'; import { LoggerService } from 'vs/platform/log/node/loggerService'; @@ -186,7 +186,7 @@ class CliMain extends Disposable { } } const sqmId = await resolveSqmId(stateService, logService); - const vsDeviceId = await resolveVSDeviceId(stateService, logService); + const devDeviceId = await resolvedevDeviceId(stateService, logService); // Initialize user data profiles after initializing the state userDataProfilesService.init(); @@ -222,7 +222,7 @@ class CliMain extends Disposable { const config: ITelemetryServiceConfig = { appenders, sendErrorTelemetry: false, - commonProperties: resolveCommonProperties(release(), hostname(), process.arch, productService.commit, productService.version, machineId, sqmId, vsDeviceId, isInternal), + commonProperties: resolveCommonProperties(release(), hostname(), process.arch, productService.commit, productService.version, machineId, sqmId, devDeviceId, isInternal), piiPaths: getPiiPathsFromEnvironment(environmentService) }; diff --git a/src/vs/code/node/sharedProcess/sharedProcessMain.ts b/src/vs/code/node/sharedProcess/sharedProcessMain.ts index 89d14e56747..f8e915491fc 100644 --- a/src/vs/code/node/sharedProcess/sharedProcessMain.ts +++ b/src/vs/code/node/sharedProcess/sharedProcessMain.ts @@ -307,7 +307,7 @@ class SharedProcessMain extends Disposable implements IClientConnectionFilter { telemetryService = new TelemetryService({ appenders, - commonProperties: resolveCommonProperties(release(), hostname(), process.arch, productService.commit, productService.version, this.configuration.machineId, this.configuration.sqmId, this.configuration.vsDeviceId, internalTelemetry), + commonProperties: resolveCommonProperties(release(), hostname(), process.arch, productService.commit, productService.version, this.configuration.machineId, this.configuration.sqmId, this.configuration.devDeviceId, internalTelemetry), sendErrorTelemetry: true, piiPaths: getPiiPathsFromEnvironment(environmentService), }, configurationService, productService); diff --git a/src/vs/editor/standalone/browser/standaloneServices.ts b/src/vs/editor/standalone/browser/standaloneServices.ts index fb624c2b126..5e15b129e0e 100644 --- a/src/vs/editor/standalone/browser/standaloneServices.ts +++ b/src/vs/editor/standalone/browser/standaloneServices.ts @@ -792,7 +792,7 @@ class StandaloneTelemetryService implements ITelemetryService { readonly sessionId = 'someValue.sessionId'; readonly machineId = 'someValue.machineId'; readonly sqmId = 'someValue.sqmId'; - readonly vsDeviceId = 'someValue.vsDeviceId'; + readonly devDeviceId = 'someValue.devDeviceId'; readonly firstSessionDate = 'someValue.firstSessionDate'; readonly sendErrorTelemetry = false; setEnabled(): void { } diff --git a/src/vs/platform/sharedProcess/electron-main/sharedProcess.ts b/src/vs/platform/sharedProcess/electron-main/sharedProcess.ts index b94f362da38..5cb80e342cc 100644 --- a/src/vs/platform/sharedProcess/electron-main/sharedProcess.ts +++ b/src/vs/platform/sharedProcess/electron-main/sharedProcess.ts @@ -34,7 +34,7 @@ export class SharedProcess extends Disposable { constructor( private readonly machineId: string, private readonly sqmId: string, - private readonly vsDeviceId: string, + private readonly devDeviceId: string, @IEnvironmentMainService private readonly environmentMainService: IEnvironmentMainService, @IUserDataProfilesService private readonly userDataProfilesService: IUserDataProfilesService, @ILifecycleMainService private readonly lifecycleMainService: ILifecycleMainService, @@ -181,7 +181,7 @@ export class SharedProcess extends Disposable { return { machineId: this.machineId, sqmId: this.sqmId, - vsDeviceId: this.vsDeviceId, + devDeviceId: this.devDeviceId, codeCachePath: this.environmentMainService.codeCachePath, profiles: { home: this.userDataProfilesService.profilesHome, diff --git a/src/vs/platform/sharedProcess/node/sharedProcess.ts b/src/vs/platform/sharedProcess/node/sharedProcess.ts index df9d68f70b2..0c0e49c3a0b 100644 --- a/src/vs/platform/sharedProcess/node/sharedProcess.ts +++ b/src/vs/platform/sharedProcess/node/sharedProcess.ts @@ -15,7 +15,7 @@ export interface ISharedProcessConfiguration { readonly sqmId: string; - readonly vsDeviceId: string; + readonly devDeviceId: string; readonly codeCachePath: string | undefined; diff --git a/src/vs/platform/telemetry/common/commonProperties.ts b/src/vs/platform/telemetry/common/commonProperties.ts index d774c4f2f32..b649cb80775 100644 --- a/src/vs/platform/telemetry/common/commonProperties.ts +++ b/src/vs/platform/telemetry/common/commonProperties.ts @@ -24,7 +24,7 @@ export function resolveCommonProperties( version: string | undefined, machineId: string | undefined, sqmId: string | undefined, - vsDeviceId: string | undefined, + devDeviceId: string | undefined, isInternalTelemetry: boolean, product?: string ): ICommonProperties { @@ -34,8 +34,8 @@ export function resolveCommonProperties( result['common.machineId'] = machineId; // __GDPR__COMMON__ "common.sqmId" : { "endPoint": "SqmMachineId", "classification": "EndUserPseudonymizedInformation", "purpose": "BusinessInsight" } result['common.sqmId'] = sqmId; - // __GDPR__COMMON__ "common.vsDeviceId" : { "endPoint": "SqmMachineId", "classification": "EndUserPseudonymizedInformation", "purpose": "BusinessInsight" } - result['common.vsDeviceId'] = vsDeviceId; + // __GDPR__COMMON__ "common.devDeviceId" : { "endPoint": "SqmMachineId", "classification": "EndUserPseudonymizedInformation", "purpose": "BusinessInsight" } + result['common.devDeviceId'] = devDeviceId; // __GDPR__COMMON__ "sessionID" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" } result['sessionID'] = generateUuid() + Date.now(); // __GDPR__COMMON__ "commitHash" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth" } diff --git a/src/vs/platform/telemetry/common/telemetry.ts b/src/vs/platform/telemetry/common/telemetry.ts index 98acd610cee..d6b4179b71f 100644 --- a/src/vs/platform/telemetry/common/telemetry.ts +++ b/src/vs/platform/telemetry/common/telemetry.ts @@ -23,7 +23,7 @@ export interface ITelemetryService { readonly sessionId: string; readonly machineId: string; readonly sqmId: string; - readonly vsDeviceId: string; + readonly devDeviceId: string; readonly firstSessionDate: string; readonly msftInternal?: boolean; @@ -74,7 +74,7 @@ export const firstSessionDateStorageKey = 'telemetry.firstSessionDate'; export const lastSessionDateStorageKey = 'telemetry.lastSessionDate'; export const machineIdKey = 'telemetry.machineId'; export const sqmIdKey = 'telemetry.sqmId'; -export const vsDeviceIdKey = 'telemetry.vsDeviceId'; +export const devDeviceIdKey = 'telemetry.devDeviceId'; // Configuration Keys export const TELEMETRY_SECTION_ID = 'telemetry'; diff --git a/src/vs/platform/telemetry/common/telemetryService.ts b/src/vs/platform/telemetry/common/telemetryService.ts index 131f6e1b61f..245bb41b5d8 100644 --- a/src/vs/platform/telemetry/common/telemetryService.ts +++ b/src/vs/platform/telemetry/common/telemetryService.ts @@ -34,7 +34,7 @@ export class TelemetryService implements ITelemetryService { readonly sessionId: string; readonly machineId: string; readonly sqmId: string; - readonly vsDeviceId: string; + readonly devDeviceId: string; readonly firstSessionDate: string; readonly msftInternal: boolean | undefined; @@ -59,7 +59,7 @@ export class TelemetryService implements ITelemetryService { this.sessionId = this._commonProperties['sessionID'] as string; this.machineId = this._commonProperties['common.machineId'] as string; this.sqmId = this._commonProperties['common.sqmId'] as string; - this.vsDeviceId = this._commonProperties['common.vsDeviceId'] as string; + this.devDeviceId = this._commonProperties['common.devDeviceId'] as string; this.firstSessionDate = this._commonProperties['common.firstSessionDate'] as string; this.msftInternal = this._commonProperties['common.msftInternal'] as boolean | undefined; diff --git a/src/vs/platform/telemetry/common/telemetryUtils.ts b/src/vs/platform/telemetry/common/telemetryUtils.ts index 45a8242943a..ec72e1a0829 100644 --- a/src/vs/platform/telemetry/common/telemetryUtils.ts +++ b/src/vs/platform/telemetry/common/telemetryUtils.ts @@ -30,7 +30,7 @@ export class NullTelemetryServiceShape implements ITelemetryService { readonly sessionId = 'someValue.sessionId'; readonly machineId = 'someValue.machineId'; readonly sqmId = 'someValue.sqmId'; - readonly vsDeviceId = 'someValue.vsDeviceId'; + readonly devDeviceId = 'someValue.devDeviceId'; readonly firstSessionDate = 'someValue.firstSessionDate'; readonly sendErrorTelemetry = false; publicLog() { } diff --git a/src/vs/platform/telemetry/electron-main/telemetryUtils.ts b/src/vs/platform/telemetry/electron-main/telemetryUtils.ts index 74916a938d1..95e993f8462 100644 --- a/src/vs/platform/telemetry/electron-main/telemetryUtils.ts +++ b/src/vs/platform/telemetry/electron-main/telemetryUtils.ts @@ -5,8 +5,8 @@ import { ILogService } from 'vs/platform/log/common/log'; import { IStateService } from 'vs/platform/state/node/state'; -import { machineIdKey, sqmIdKey, vsDeviceIdKey } from 'vs/platform/telemetry/common/telemetry'; -import { resolveMachineId as resolveNodeMachineId, resolveSqmId as resolveNodeSqmId, resolveVSDeviceId as resolveNodeVSDeviceId } from 'vs/platform/telemetry/node/telemetryUtils'; +import { machineIdKey, sqmIdKey, devDeviceIdKey } from 'vs/platform/telemetry/common/telemetry'; +import { resolveMachineId as resolveNodeMachineId, resolveSqmId as resolveNodeSqmId, resolvedevDeviceId as resolveNodedevDeviceId } from 'vs/platform/telemetry/node/telemetryUtils'; export async function resolveMachineId(stateService: IStateService, logService: ILogService): Promise { // Call the node layers implementation to avoid code duplication @@ -21,8 +21,8 @@ export async function resolveSqmId(stateService: IStateService, logService: ILog return sqmId; } -export async function resolveVSDeviceId(stateService: IStateService, logService: ILogService): Promise { - const vsDeviceId = await resolveNodeVSDeviceId(stateService, logService); - stateService.setItem(vsDeviceIdKey, vsDeviceId); - return vsDeviceId; +export async function resolvedevDeviceId(stateService: IStateService, logService: ILogService): Promise { + const devDeviceId = await resolveNodedevDeviceId(stateService, logService); + stateService.setItem(devDeviceIdKey, devDeviceId); + return devDeviceId; } diff --git a/src/vs/platform/telemetry/node/telemetryUtils.ts b/src/vs/platform/telemetry/node/telemetryUtils.ts index 836b2925ca7..4f8fa8c8a5b 100644 --- a/src/vs/platform/telemetry/node/telemetryUtils.ts +++ b/src/vs/platform/telemetry/node/telemetryUtils.ts @@ -4,10 +4,10 @@ *--------------------------------------------------------------------------------------------*/ import { isMacintosh } from 'vs/base/common/platform'; -import { getMachineId, getSqmMachineId, getVSDeviceId } from 'vs/base/node/id'; +import { getMachineId, getSqmMachineId, getdevDeviceId } from 'vs/base/node/id'; import { ILogService } from 'vs/platform/log/common/log'; import { IStateReadService } from 'vs/platform/state/node/state'; -import { machineIdKey, sqmIdKey, vsDeviceIdKey } from 'vs/platform/telemetry/common/telemetry'; +import { machineIdKey, sqmIdKey, devDeviceIdKey } from 'vs/platform/telemetry/common/telemetry'; export async function resolveMachineId(stateService: IStateReadService, logService: ILogService): Promise { @@ -30,11 +30,11 @@ export async function resolveSqmId(stateService: IStateReadService, logService: return sqmId; } -export async function resolveVSDeviceId(stateService: IStateReadService, logService: ILogService): Promise { - let vsDeviceId = stateService.getItem(vsDeviceIdKey); - if (typeof vsDeviceId !== 'string') { - vsDeviceId = await getVSDeviceId(logService.error.bind(logService)); +export async function resolvedevDeviceId(stateService: IStateReadService, logService: ILogService): Promise { + let devDeviceId = stateService.getItem(devDeviceIdKey); + if (typeof devDeviceId !== 'string') { + devDeviceId = await getdevDeviceId(logService.error.bind(logService)); } - return vsDeviceId; + return devDeviceId; } diff --git a/src/vs/platform/window/common/window.ts b/src/vs/platform/window/common/window.ts index 007c84ba19d..ae20d9d7620 100644 --- a/src/vs/platform/window/common/window.ts +++ b/src/vs/platform/window/common/window.ts @@ -348,7 +348,7 @@ export interface INativeWindowConfiguration extends IWindowConfiguration, Native machineId: string; sqmId: string; - vsDeviceId: string; + devDeviceId: string; execPath: string; backupPath?: string; diff --git a/src/vs/platform/windows/electron-main/windowsMainService.ts b/src/vs/platform/windows/electron-main/windowsMainService.ts index cfb6fe56efa..a4cb0ca698b 100644 --- a/src/vs/platform/windows/electron-main/windowsMainService.ts +++ b/src/vs/platform/windows/electron-main/windowsMainService.ts @@ -211,7 +211,7 @@ export class WindowsMainService extends Disposable implements IWindowsMainServic constructor( private readonly machineId: string, private readonly sqmId: string, - private readonly vsDeviceId: string, + private readonly devDeviceId: string, private readonly initialUserEnv: IProcessEnvironment, @ILogService private readonly logService: ILogService, @ILoggerMainService private readonly loggerService: ILoggerMainService, @@ -1410,7 +1410,7 @@ export class WindowsMainService extends Disposable implements IWindowsMainServic machineId: this.machineId, sqmId: this.sqmId, - vsDeviceId: this.vsDeviceId, + devDeviceId: this.devDeviceId, windowId: -1, // Will be filled in by the window once loaded later diff --git a/src/vs/server/node/serverServices.ts b/src/vs/server/node/serverServices.ts index b4ffa2b38c5..46f2f004655 100644 --- a/src/vs/server/node/serverServices.ts +++ b/src/vs/server/node/serverServices.ts @@ -9,7 +9,7 @@ import { DisposableStore, toDisposable } from 'vs/base/common/lifecycle'; import { Schemas } from 'vs/base/common/network'; import * as path from 'vs/base/common/path'; import { IURITransformer } from 'vs/base/common/uriIpc'; -import { getMachineId, getSqmMachineId, getVSDeviceId } from 'vs/base/node/id'; +import { getMachineId, getSqmMachineId, getdevDeviceId } from 'vs/base/node/id'; import { Promises } from 'vs/base/node/pfs'; import { ClientConnectionEvent, IMessagePassingProtocol, IPCServer, StaticRouter } from 'vs/base/parts/ipc/common/ipc'; import { ProtocolConstants } from 'vs/base/parts/ipc/common/ipc.net'; @@ -132,12 +132,12 @@ export async function setupServerServices(connectionToken: ServerConnectionToken socketServer.registerChannel('userDataProfiles', new RemoteUserDataProfilesServiceChannel(userDataProfilesService, (ctx: RemoteAgentConnectionContext) => getUriTransformer(ctx.remoteAuthority))); // Initialize - const [, , machineId, sqmId, vsDeviceId] = await Promise.all([ + const [, , machineId, sqmId, devDeviceId] = await Promise.all([ configurationService.initialize(), userDataProfilesService.init(), getMachineId(logService.error.bind(logService)), getSqmMachineId(logService.error.bind(logService)), - getVSDeviceId(logService.error.bind(logService)) + getdevDeviceId(logService.error.bind(logService)) ]); const extensionHostStatusService = new ExtensionHostStatusService(); @@ -157,7 +157,7 @@ export async function setupServerServices(connectionToken: ServerConnectionToken const config: ITelemetryServiceConfig = { appenders: [oneDsAppender], - commonProperties: resolveCommonProperties(release(), hostname(), process.arch, productService.commit, productService.version + '-remote', machineId, sqmId, vsDeviceId, isInternal, 'remoteAgent'), + commonProperties: resolveCommonProperties(release(), hostname(), process.arch, productService.commit, productService.version + '-remote', machineId, sqmId, devDeviceId, isInternal, 'remoteAgent'), piiPaths: getPiiPathsFromEnvironment(environmentService) }; const initialTelemetryLevelArg = environmentService.args['telemetry-level']; diff --git a/src/vs/workbench/api/common/extHostTelemetry.ts b/src/vs/workbench/api/common/extHostTelemetry.ts index 99d2114de97..64a12869610 100644 --- a/src/vs/workbench/api/common/extHostTelemetry.ts +++ b/src/vs/workbench/api/common/extHostTelemetry.ts @@ -105,7 +105,7 @@ export class ExtHostTelemetry extends Disposable implements ExtHostTelemetryShap commonProperties['common.vscodemachineid'] = this.initData.telemetryInfo.machineId; commonProperties['common.vscodesessionid'] = this.initData.telemetryInfo.sessionId; commonProperties['common.sqmid'] = this.initData.telemetryInfo.sqmId; - commonProperties['common.vsdeviceid'] = this.initData.telemetryInfo.vsDeviceId; + commonProperties['common.devDeviceId'] = this.initData.telemetryInfo.devDeviceId; commonProperties['common.vscodeversion'] = this.initData.version; commonProperties['common.isnewappinstall'] = isNewAppInstall(this.initData.telemetryInfo.firstSessionDate); commonProperties['common.product'] = this.initData.environment.appHost; diff --git a/src/vs/workbench/api/test/browser/extHostTelemetry.test.ts b/src/vs/workbench/api/test/browser/extHostTelemetry.test.ts index c66ea784c31..97bfb308b9f 100644 --- a/src/vs/workbench/api/test/browser/extHostTelemetry.test.ts +++ b/src/vs/workbench/api/test/browser/extHostTelemetry.test.ts @@ -45,7 +45,7 @@ suite('ExtHostTelemetry', function () { sessionId: 'test', machineId: 'test', sqmId: 'test', - vsDeviceId: 'test' + devDeviceId: 'test' }; const mockRemote = { diff --git a/src/vs/workbench/services/environment/electron-sandbox/environmentService.ts b/src/vs/workbench/services/environment/electron-sandbox/environmentService.ts index f8e0c3e498a..ce1d79f7751 100644 --- a/src/vs/workbench/services/environment/electron-sandbox/environmentService.ts +++ b/src/vs/workbench/services/environment/electron-sandbox/environmentService.ts @@ -39,7 +39,7 @@ export interface INativeWorkbenchEnvironmentService extends IBrowserWorkbenchEnv readonly os: IOSConfiguration; readonly machineId: string; readonly sqmId: string; - readonly vsDeviceId: string; + readonly devDeviceId: string; // --- Paths readonly execPath: string; @@ -65,7 +65,7 @@ export class NativeWorkbenchEnvironmentService extends AbstractNativeEnvironment get sqmId() { return this.configuration.sqmId; } @memoize - get vsDeviceId() { return this.configuration.vsDeviceId; } + get devDeviceId() { return this.configuration.devDeviceId; } @memoize get remoteAuthority() { return this.configuration.remoteAuthority; } diff --git a/src/vs/workbench/services/extensions/browser/webWorkerExtensionHost.ts b/src/vs/workbench/services/extensions/browser/webWorkerExtensionHost.ts index 33b5adf244a..0c8d2e27317 100644 --- a/src/vs/workbench/services/extensions/browser/webWorkerExtensionHost.ts +++ b/src/vs/workbench/services/extensions/browser/webWorkerExtensionHost.ts @@ -310,7 +310,7 @@ export class WebWorkerExtensionHost extends Disposable implements IExtensionHost sessionId: this._telemetryService.sessionId, machineId: this._telemetryService.machineId, sqmId: this._telemetryService.sqmId, - vsDeviceId: this._telemetryService.vsDeviceId, + devDeviceId: this._telemetryService.devDeviceId, firstSessionDate: this._telemetryService.firstSessionDate, msftInternal: this._telemetryService.msftInternal }, diff --git a/src/vs/workbench/services/extensions/common/extensionHostProtocol.ts b/src/vs/workbench/services/extensions/common/extensionHostProtocol.ts index 57cc1052139..c44205e2453 100644 --- a/src/vs/workbench/services/extensions/common/extensionHostProtocol.ts +++ b/src/vs/workbench/services/extensions/common/extensionHostProtocol.ts @@ -41,7 +41,7 @@ export interface IExtensionHostInitData { readonly sessionId: string; readonly machineId: string; readonly sqmId: string; - readonly vsDeviceId: string; + readonly devDeviceId: string; readonly firstSessionDate: string; readonly msftInternal?: boolean; }; diff --git a/src/vs/workbench/services/extensions/common/remoteExtensionHost.ts b/src/vs/workbench/services/extensions/common/remoteExtensionHost.ts index 331257d1e4d..617256fb123 100644 --- a/src/vs/workbench/services/extensions/common/remoteExtensionHost.ts +++ b/src/vs/workbench/services/extensions/common/remoteExtensionHost.ts @@ -244,7 +244,7 @@ export class RemoteExtensionHost extends Disposable implements IExtensionHost { sessionId: this._telemetryService.sessionId, machineId: this._telemetryService.machineId, sqmId: this._telemetryService.sqmId, - vsDeviceId: this._telemetryService.vsDeviceId, + devDeviceId: this._telemetryService.devDeviceId, firstSessionDate: this._telemetryService.firstSessionDate, msftInternal: this._telemetryService.msftInternal }, diff --git a/src/vs/workbench/services/extensions/electron-sandbox/localProcessExtensionHost.ts b/src/vs/workbench/services/extensions/electron-sandbox/localProcessExtensionHost.ts index c96ce9ba199..0074c58d815 100644 --- a/src/vs/workbench/services/extensions/electron-sandbox/localProcessExtensionHost.ts +++ b/src/vs/workbench/services/extensions/electron-sandbox/localProcessExtensionHost.ts @@ -503,7 +503,7 @@ export class NativeLocalProcessExtensionHost implements IExtensionHost { sessionId: this._telemetryService.sessionId, machineId: this._telemetryService.machineId, sqmId: this._telemetryService.sqmId, - vsDeviceId: this._telemetryService.vsDeviceId, + devDeviceId: this._telemetryService.devDeviceId, firstSessionDate: this._telemetryService.firstSessionDate, msftInternal: this._telemetryService.msftInternal }, diff --git a/src/vs/workbench/services/telemetry/browser/telemetryService.ts b/src/vs/workbench/services/telemetry/browser/telemetryService.ts index 0feab911fda..29418eaed3a 100644 --- a/src/vs/workbench/services/telemetry/browser/telemetryService.ts +++ b/src/vs/workbench/services/telemetry/browser/telemetryService.ts @@ -29,7 +29,7 @@ export class TelemetryService extends Disposable implements ITelemetryService { get sessionId(): string { return this.impl.sessionId; } get machineId(): string { return this.impl.machineId; } get sqmId(): string { return this.impl.sqmId; } - get vsDeviceId(): string { return this.impl.vsDeviceId; } + get devDeviceId(): string { return this.impl.devDeviceId; } get firstSessionDate(): string { return this.impl.firstSessionDate; } get msftInternal(): boolean | undefined { return this.impl.msftInternal; } diff --git a/src/vs/workbench/services/telemetry/common/workbenchCommonProperties.ts b/src/vs/workbench/services/telemetry/common/workbenchCommonProperties.ts index 946adb270c8..6d8ec5b211f 100644 --- a/src/vs/workbench/services/telemetry/common/workbenchCommonProperties.ts +++ b/src/vs/workbench/services/telemetry/common/workbenchCommonProperties.ts @@ -17,12 +17,12 @@ export function resolveWorkbenchCommonProperties( version: string | undefined, machineId: string, sqmId: string, - vsDeviceId: string, + devDeviceId: string, isInternalTelemetry: boolean, process: INodeProcess, remoteAuthority?: string ): ICommonProperties { - const result = resolveCommonProperties(release, hostname, process.arch, commit, version, machineId, sqmId, vsDeviceId, isInternalTelemetry); + const result = resolveCommonProperties(release, hostname, process.arch, commit, version, machineId, sqmId, devDeviceId, isInternalTelemetry); const firstSessionDate = storageService.get(firstSessionDateStorageKey, StorageScope.APPLICATION)!; const lastSessionDate = storageService.get(lastSessionDateStorageKey, StorageScope.APPLICATION)!; diff --git a/src/vs/workbench/services/telemetry/electron-sandbox/telemetryService.ts b/src/vs/workbench/services/telemetry/electron-sandbox/telemetryService.ts index 52f333cd51d..384c53bba07 100644 --- a/src/vs/workbench/services/telemetry/electron-sandbox/telemetryService.ts +++ b/src/vs/workbench/services/telemetry/electron-sandbox/telemetryService.ts @@ -28,7 +28,7 @@ export class TelemetryService extends Disposable implements ITelemetryService { get sessionId(): string { return this.impl.sessionId; } get machineId(): string { return this.impl.machineId; } get sqmId(): string { return this.impl.sqmId; } - get vsDeviceId(): string { return this.impl.vsDeviceId; } + get devDeviceId(): string { return this.impl.devDeviceId; } get firstSessionDate(): string { return this.impl.firstSessionDate; } get msftInternal(): boolean | undefined { return this.impl.msftInternal; } @@ -46,7 +46,7 @@ export class TelemetryService extends Disposable implements ITelemetryService { const channel = sharedProcessService.getChannel('telemetryAppender'); const config: ITelemetryServiceConfig = { appenders: [new TelemetryAppenderClient(channel)], - commonProperties: resolveWorkbenchCommonProperties(storageService, environmentService.os.release, environmentService.os.hostname, productService.commit, productService.version, environmentService.machineId, environmentService.sqmId, environmentService.vsDeviceId, isInternal, process, environmentService.remoteAuthority), + commonProperties: resolveWorkbenchCommonProperties(storageService, environmentService.os.release, environmentService.os.hostname, productService.commit, productService.version, environmentService.machineId, environmentService.sqmId, environmentService.devDeviceId, isInternal, process, environmentService.remoteAuthority), piiPaths: getPiiPathsFromEnvironment(environmentService), sendErrorTelemetry: true }; diff --git a/src/vs/workbench/services/telemetry/test/node/commonProperties.test.ts b/src/vs/workbench/services/telemetry/test/node/commonProperties.test.ts index 8898cb332f7..e51736b4ee9 100644 --- a/src/vs/workbench/services/telemetry/test/node/commonProperties.test.ts +++ b/src/vs/workbench/services/telemetry/test/node/commonProperties.test.ts @@ -26,7 +26,7 @@ suite('Telemetry - common properties', function () { }); test('default', function () { - const props = resolveWorkbenchCommonProperties(testStorageService, release(), hostname(), commit, version, 'someMachineId', 'someSqmId', 'someVSDeviceId', false, process); + const props = resolveWorkbenchCommonProperties(testStorageService, release(), hostname(), commit, version, 'someMachineId', 'someSqmId', 'somedevDeviceId', false, process); assert.ok('commitHash' in props); assert.ok('sessionID' in props); assert.ok('timestamp' in props); @@ -50,14 +50,14 @@ suite('Telemetry - common properties', function () { testStorageService.store('telemetry.lastSessionDate', new Date().toUTCString(), StorageScope.APPLICATION, StorageTarget.MACHINE); - const props = resolveWorkbenchCommonProperties(testStorageService, release(), hostname(), commit, version, 'someMachineId', 'someSqmId', 'someVSDeviceId', false, process); + const props = resolveWorkbenchCommonProperties(testStorageService, release(), hostname(), commit, version, 'someMachineId', 'someSqmId', 'somedevDeviceId', false, process); assert.ok('common.lastSessionDate' in props); // conditional, see below assert.ok('common.isNewSession' in props); assert.strictEqual(props['common.isNewSession'], '0'); }); test('values chance on ask', async function () { - const props = resolveWorkbenchCommonProperties(testStorageService, release(), hostname(), commit, version, 'someMachineId', 'someSqmId', 'someVSDeviceId', false, process); + const props = resolveWorkbenchCommonProperties(testStorageService, release(), hostname(), commit, version, 'someMachineId', 'someSqmId', 'somedevDeviceId', false, process); let value1 = props['common.sequence']; let value2 = props['common.sequence']; assert.ok(value1 !== value2, 'seq'); diff --git a/src/vs/workbench/services/workingCopy/test/electron-sandbox/workingCopyBackupService.test.ts b/src/vs/workbench/services/workingCopy/test/electron-sandbox/workingCopyBackupService.test.ts index 6629be8043b..b4ee3100922 100644 --- a/src/vs/workbench/services/workingCopy/test/electron-sandbox/workingCopyBackupService.test.ts +++ b/src/vs/workbench/services/workingCopy/test/electron-sandbox/workingCopyBackupService.test.ts @@ -56,7 +56,7 @@ const TestNativeWindowConfiguration: INativeWindowConfiguration = { windowId: 0, machineId: 'testMachineId', sqmId: 'testSqmId', - vsDeviceId: 'testVSDeviceId', + devDeviceId: 'testdevDeviceId', logLevel: LogLevel.Error, loggers: { global: [], window: [] }, mainPid: 0,