@@ -37,6 +37,7 @@ import { UserDataSyncStoreTypeSynchronizer } from 'vs/platform/userDataSync/comm
37
37
38
38
type UserAccountClassification = {
39
39
id : { classification : 'EndUserPseudonymizedInformation' , purpose : 'BusinessInsight' } ;
40
+ providerId : { classification : 'EndUserPseudonymizedInformation' , purpose : 'BusinessInsight' } ;
40
41
} ;
41
42
42
43
type FirstTimeSyncClassification = {
@@ -45,6 +46,7 @@ type FirstTimeSyncClassification = {
45
46
46
47
type UserAccountEvent = {
47
48
id : string ;
49
+ providerId : string ;
48
50
} ;
49
51
50
52
type FirstTimeSyncAction = 'pull' | 'push' | 'merge' | 'manual' ;
@@ -519,18 +521,20 @@ export class UserDataSyncWorkbenchService extends Disposable implements IUserDat
519
521
if ( ! result ) {
520
522
return false ;
521
523
}
522
- let sessionId : string , accountName : string , accountId : string ;
524
+ let sessionId : string , accountName : string , accountId : string , authenticationProviderId : string ;
523
525
if ( isAuthenticationProvider ( result ) ) {
524
526
const session = await this . authenticationService . createSession ( result . id , result . scopes ) ;
525
527
sessionId = session . id ;
526
528
accountName = session . account . label ;
527
529
accountId = session . account . id ;
530
+ authenticationProviderId = result . id ;
528
531
} else {
529
532
sessionId = result . sessionId ;
530
533
accountName = result . accountName ;
531
534
accountId = result . accountId ;
535
+ authenticationProviderId = result . authenticationProviderId ;
532
536
}
533
- await this . switch ( sessionId , accountName , accountId ) ;
537
+ await this . switch ( sessionId , accountName , accountId , authenticationProviderId ) ;
534
538
return true ;
535
539
}
536
540
@@ -604,13 +608,13 @@ export class UserDataSyncWorkbenchService extends Disposable implements IUserDat
604
608
return quickPickItems ;
605
609
}
606
610
607
- private async switch ( sessionId : string , accountName : string , accountId : string ) : Promise < void > {
611
+ private async switch ( sessionId : string , accountName : string , accountId : string , authenticationProviderId : string ) : Promise < void > {
608
612
const currentAccount = this . current ;
609
613
if ( this . userDataAutoSyncEnablementService . isEnabled ( ) && ( currentAccount && currentAccount . accountName !== accountName ) ) {
610
614
// accounts are switched while sync is enabled.
611
615
}
612
616
this . currentSessionId = sessionId ;
613
- this . telemetryService . publicLog2 < UserAccountEvent , UserAccountClassification > ( 'sync.userAccount' , { id : accountId } ) ;
617
+ this . telemetryService . publicLog2 < UserAccountEvent , UserAccountClassification > ( 'sync.userAccount' , { id : accountId , providerId : authenticationProviderId } ) ;
614
618
await this . update ( ) ;
615
619
}
616
620
0 commit comments