mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 04:49:35 +00:00
Add scopes property to login telemetry (#128261)
* Add scopes property to login telemetry
This commit is contained in:
parent
83f39dd6c6
commit
87d692b7bf
|
@ -196,9 +196,13 @@ export class GitHubAuthenticationProvider implements vscode.AuthenticationProvid
|
|||
public async createSession(scopes: string[]): Promise<vscode.AuthenticationSession> {
|
||||
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);
|
||||
|
|
|
@ -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: [] });
|
||||
|
|
Loading…
Reference in a new issue