@@ -33,6 +33,8 @@ import { mkdirp, writeFile } from 'vs/base/node/pfs';
3333import { IChoiceService } from 'vs/platform/message/common/message' ;
3434import { ChoiceCliService } from 'vs/platform/message/node/messageCli' ;
3535import { getBaseLabel } from 'vs/base/common/labels' ;
36+ import { IStateService } from 'vs/platform/state/common/state' ;
37+ import { StateService } from 'vs/platform/state/node/stateService' ;
3638
3739const notFound = ( id : string ) => localize ( 'notFound' , "Extension '{0}' not found." , id ) ;
3840const notInstalled = ( id : string ) => localize ( 'notInstalled' , "Extension '{0}' is not installed." , id ) ;
@@ -176,11 +178,13 @@ const eventPrefix = 'monacoworkbench';
176178export function main ( argv : ParsedArgs ) : TPromise < void > {
177179 const services = new ServiceCollection ( ) ;
178180 services . set ( IEnvironmentService , new SyncDescriptor ( EnvironmentService , argv , process . execPath ) ) ;
181+ services . set ( IStateService , new SyncDescriptor ( StateService ) ) ;
179182
180183 const instantiationService : IInstantiationService = new InstantiationService ( services ) ;
181184
182185 return instantiationService . invokeFunction ( accessor => {
183186 const envService = accessor . get ( IEnvironmentService ) ;
187+ const stateService = accessor . get ( IStateService ) ;
184188
185189 return TPromise . join ( [ envService . appSettingsHome , envService . extensionsPath ] . map ( p => mkdirp ( p ) ) ) . then ( ( ) => {
186190 const { appRoot, extensionsPath, extensionDevelopmentPath, isBuilt, installSource } = envService ;
@@ -205,7 +209,7 @@ export function main(argv: ParsedArgs): TPromise<void> {
205209
206210 const config : ITelemetryServiceConfig = {
207211 appender : combinedAppender ( ...appenders ) ,
208- commonProperties : resolveCommonProperties ( product . commit , pkg . version , installSource ) ,
212+ commonProperties : resolveCommonProperties ( product . commit , pkg . version , installSource , stateService . getItem ( 'telemetry.machineId' ) ) ,
209213 piiPaths : [ appRoot , extensionsPath ]
210214 } ;
211215
0 commit comments