diff --git a/extensions/github-authentication/src/github.ts b/extensions/github-authentication/src/github.ts index 563785b89af..69cbc2b3c15 100644 --- a/extensions/github-authentication/src/github.ts +++ b/extensions/github-authentication/src/github.ts @@ -196,9 +196,13 @@ export class GitHubAuthenticationProvider implements vscode.AuthenticationProvid public async createSession(scopes: string[]): Promise { try { /* __GDPR__ - "login" : { } + "login" : { + "scopes": { "classification": "PublicNonPersonalData", "purpose": "FeatureInsight" } + } */ - this.telemetryReporter?.sendTelemetryEvent('login'); + this.telemetryReporter?.sendTelemetryEvent('login', { + scopes: JSON.stringify(scopes), + }); const token = await this._githubServer.login(scopes.join(' ')); this.afterTokenLoad(token); diff --git a/extensions/microsoft-authentication/src/extension.ts b/extensions/microsoft-authentication/src/extension.ts index 41b8690f344..828f57d18a3 100644 --- a/extensions/microsoft-authentication/src/extension.ts +++ b/extensions/microsoft-authentication/src/extension.ts @@ -24,9 +24,14 @@ export async function activate(context: vscode.ExtensionContext) { createSession: async (scopes: string[]) => { try { /* __GDPR__ - "login" : { } + "login" : { + "scopes": { "classification": "PublicNonPersonalData", "purpose": "FeatureInsight" } + } */ - telemetryReporter.sendTelemetryEvent('login'); + telemetryReporter.sendTelemetryEvent('login', { + // Get rid of guids from telemetry. + scopes: JSON.stringify(scopes.map(s => s.replace(/[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}/i, '{guid}'))), + }); const session = await loginService.createSession(scopes.sort().join(' ')); onDidChangeSessions.fire({ added: [session], removed: [], changed: [] });