diff --git a/extensions/microsoft-authentication/src/common/telemetryReporter.ts b/extensions/microsoft-authentication/src/common/telemetryReporter.ts index c28aa887e0c..e18c743de9b 100644 --- a/extensions/microsoft-authentication/src/common/telemetryReporter.ts +++ b/extensions/microsoft-authentication/src/common/telemetryReporter.ts @@ -35,6 +35,13 @@ export class MicrosoftAuthenticationTelemetryReporter implements IExperimentatio ); } + sendActivatedWithClassicImplementationEvent(): void { + /* __GDPR__ + "activatingClassic" : { "owner": "TylerLeonhardt", "comment": "Used to determine how often users use the classic login flow." } + */ + this._telemetryReporter.sendTelemetryEvent('activatingClassic'); + } + sendLoginEvent(scopes: readonly string[]): void { /* __GDPR__ "login" : { diff --git a/extensions/microsoft-authentication/src/extension.ts b/extensions/microsoft-authentication/src/extension.ts index bd32a82290a..6a5fac9765d 100644 --- a/extensions/microsoft-authentication/src/extension.ts +++ b/extensions/microsoft-authentication/src/extension.ts @@ -48,14 +48,12 @@ export async function activate(context: ExtensionContext) { env.uriScheme !== 'vscode', // isPreRelease ); useMsal = shouldUseMsal(expService); - const clientIdVersion = workspace.getConfiguration('microsoft-authentication').get<'v1' | 'v2'>('clientIdVersion', 'v1'); - context.subscriptions.push(workspace.onDidChangeConfiguration(async e => { if (!e.affectsConfiguration('microsoft-authentication')) { return; } - if (useMsal === shouldUseMsal(expService) && clientIdVersion === workspace.getConfiguration('microsoft-authentication').get<'v1' | 'v2'>('clientIdVersion', 'v1')) { + if (useMsal === shouldUseMsal(expService)) { return; } @@ -77,6 +75,7 @@ export async function activate(context: ExtensionContext) { if (useMsal && typeof navigator === 'undefined') { await extensionV2.activate(context, mainTelemetryReporter); } else { + mainTelemetryReporter.sendActivatedWithClassicImplementationEvent(); await extensionV1.activate(context, mainTelemetryReporter.telemetryReporter); } }