@@ -239,11 +239,20 @@ export class UserDataProfileImportExportService extends Disposable implements IU
239
239
owner : 'sandy081' ;
240
240
comment : 'Report when profile is about to be saved' ;
241
241
} ;
242
+ type CreateProfileInfoClassification = {
243
+ owner : 'sandy081' ;
244
+ comment : 'Report when profile is about to be created' ;
245
+ source : { classification : 'SystemMetaData' ; purpose : 'FeatureInsight' ; comment : 'Type of profile source' } ;
246
+ } ;
247
+ type CreateProfileInfoEvent = {
248
+ source : string | undefined ;
249
+ } ;
250
+ const createProfileTelemetryData : CreateProfileInfoEvent = { source : source instanceof URI ? 'template' : isUserDataProfile ( source ) ? 'profile' : source ? 'external' : undefined } ;
242
251
243
252
if ( profile ) {
244
253
this . telemetryService . publicLog2 < { } , SaveProfileInfoClassification > ( 'userDataProfile.startEdit' ) ;
245
254
} else {
246
- this . telemetryService . publicLog2 < { } , SaveProfileInfoClassification > ( 'userDataProfile.startCreate' ) ;
255
+ this . telemetryService . publicLog2 < CreateProfileInfoEvent , CreateProfileInfoClassification > ( 'userDataProfile.startCreate' , createProfileTelemetryData ) ;
247
256
}
248
257
249
258
const disposables = new DisposableStore ( ) ;
@@ -395,7 +404,7 @@ export class UserDataProfileImportExportService extends Disposable implements IU
395
404
if ( profile ) {
396
405
this . telemetryService . publicLog2 < { } , SaveProfileInfoClassification > ( 'userDataProfile.cancelEdit' ) ;
397
406
} else {
398
- this . telemetryService . publicLog2 < { } , SaveProfileInfoClassification > ( 'userDataProfile.cancelCreate' ) ;
407
+ this . telemetryService . publicLog2 < CreateProfileInfoEvent , CreateProfileInfoClassification > ( 'userDataProfile.cancelCreate' , createProfileTelemetryData ) ;
399
408
}
400
409
return ;
401
410
}
@@ -414,16 +423,17 @@ export class UserDataProfileImportExportService extends Disposable implements IU
414
423
await this . userDataProfileManagementService . updateProfile ( profile , { name : result . name , useDefaultFlags : profile . useDefaultFlags && ! useDefaultFlags ? { } : useDefaultFlags } ) ;
415
424
} else {
416
425
if ( source instanceof URI ) {
417
- this . telemetryService . publicLog2 < { } , SaveProfileInfoClassification > ( 'userDataProfile.createFromTemplate' ) ;
426
+ this . telemetryService . publicLog2 < CreateProfileInfoEvent , CreateProfileInfoClassification > ( 'userDataProfile.createFromTemplate' , createProfileTelemetryData ) ;
418
427
await this . importProfile ( source , { mode : 'apply' , name : result . name , useDefaultFlags } ) ;
419
428
} else if ( isUserDataProfileTemplate ( source ) ) {
420
429
source . name = result . name ;
430
+ this . telemetryService . publicLog2 < CreateProfileInfoEvent , CreateProfileInfoClassification > ( 'userDataProfile.createFromExternalTemplate' , createProfileTelemetryData ) ;
421
431
await this . createAndSwitch ( source , false , true , { useDefaultFlags } , localize ( 'create profile' , "Create Profile" ) ) ;
422
432
} else if ( source ) {
423
- this . telemetryService . publicLog2 < { } , SaveProfileInfoClassification > ( 'userDataProfile.createFromProfile' ) ;
433
+ this . telemetryService . publicLog2 < CreateProfileInfoEvent , CreateProfileInfoClassification > ( 'userDataProfile.createFromProfile' , createProfileTelemetryData ) ;
424
434
await this . createFromProfile ( source , result . name , { useDefaultFlags } ) ;
425
435
} else {
426
- this . telemetryService . publicLog2 < { } , SaveProfileInfoClassification > ( 'userDataProfile.createEmptyProfile' ) ;
436
+ this . telemetryService . publicLog2 < CreateProfileInfoEvent , CreateProfileInfoClassification > ( 'userDataProfile.createEmptyProfile' , createProfileTelemetryData ) ;
427
437
await this . userDataProfileManagementService . createAndEnterProfile ( result . name , { useDefaultFlags } ) ;
428
438
}
429
439
}
0 commit comments