Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add owner and comment to a telemetry event #148752

Merged
merged 8 commits into from May 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 7 additions & 5 deletions extensions/github-authentication/src/github.ts
Expand Up @@ -213,7 +213,9 @@ export class GitHubAuthenticationProvider implements vscode.AuthenticationProvid

/* __GDPR__
"login" : {
"scopes": { "classification": "PublicNonPersonalData", "purpose": "FeatureInsight" }
"owner": "TylerLeonhardt",
"comment": "Used to determine how much usage the GitHub Auth Provider gets.",
"scopes": { "classification": "PublicNonPersonalData", "purpose": "FeatureInsight", "comment": "Used to determine what scope combinations are being requested." }
}
*/
this._telemetryReporter?.sendTelemetryEvent('login', {
Expand Down Expand Up @@ -244,14 +246,14 @@ export class GitHubAuthenticationProvider implements vscode.AuthenticationProvid
// If login was cancelled, do not notify user.
if (e === 'Cancelled' || e.message === 'Cancelled') {
/* __GDPR__
"loginCancelled" : { }
"loginCancelled" : { "owner": "TylerLeonhardt", "comment": "Used to determine how often users cancel the login flow." }
*/
this._telemetryReporter?.sendTelemetryEvent('loginCancelled');
throw e;
}

/* __GDPR__
"loginFailed" : { }
"loginFailed" : { "owner": "TylerLeonhardt", "comment": "Used to determine how often users run into an error login flow." }
*/
this._telemetryReporter?.sendTelemetryEvent('loginFailed');

Expand All @@ -274,7 +276,7 @@ export class GitHubAuthenticationProvider implements vscode.AuthenticationProvid
public async removeSession(id: string) {
try {
/* __GDPR__
"logout" : { }
"logout" : { "owner": "TylerLeonhardt", "comment": "Used to determine how often users log out of an account." }
*/
this._telemetryReporter?.sendTelemetryEvent('logout');

Expand All @@ -294,7 +296,7 @@ export class GitHubAuthenticationProvider implements vscode.AuthenticationProvid
}
} catch (e) {
/* __GDPR__
"logoutFailed" : { }
"logoutFailed" : { "owner": "TylerLeonhardt", "comment": "Used to determine how often logging out of an account fails." }
*/
this._telemetryReporter?.sendTelemetryEvent('logoutFailed');

Expand Down
10 changes: 6 additions & 4 deletions extensions/microsoft-authentication/src/extension.ts
Expand Up @@ -21,7 +21,9 @@ export async function activate(context: vscode.ExtensionContext) {
try {
/* __GDPR__
"login" : {
"scopes": { "classification": "PublicNonPersonalData", "purpose": "FeatureInsight" }
"owner": "TylerLeonhardt",
"comment": "Used to determine the usage of the Microsoft Auth Provider.",
"scopes": { "classification": "PublicNonPersonalData", "purpose": "FeatureInsight", "comment": "Used to determine what scope combinations are being requested." }
}
*/
telemetryReporter.sendTelemetryEvent('login', {
Expand All @@ -34,7 +36,7 @@ export async function activate(context: vscode.ExtensionContext) {
return session;
} catch (e) {
/* __GDPR__
"loginFailed" : { }
"loginFailed" : { "owner": "TylerLeonhardt", "comment": "Used to determine how often users run into issues with the login flow." }
*/
telemetryReporter.sendTelemetryEvent('loginFailed');

Expand All @@ -44,7 +46,7 @@ export async function activate(context: vscode.ExtensionContext) {
removeSession: async (id: string) => {
try {
/* __GDPR__
"logout" : { }
"logout" : { "owner": "TylerLeonhardt", "comment": "Used to determine how often users log out." }
*/
telemetryReporter.sendTelemetryEvent('logout');

Expand All @@ -54,7 +56,7 @@ export async function activate(context: vscode.ExtensionContext) {
}
} catch (e) {
/* __GDPR__
"logoutFailed" : { }
"logoutFailed" : { "owner": "TylerLeonhardt", "comment": "Used to determine how often fail to log out." }
*/
telemetryReporter.sendTelemetryEvent('logoutFailed');
}
Expand Down
6 changes: 4 additions & 2 deletions src/vs/workbench/api/browser/mainThreadAuthentication.ts
Expand Up @@ -274,8 +274,10 @@ export class MainThreadAuthentication extends Disposable implements MainThreadAu

if (session) {
type AuthProviderUsageClassification = {
extensionId: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' };
providerId: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' };
owner: 'TylerLeonhardt';
comment: 'Used to see which extensions are using which providers';
TylerLeonhardt marked this conversation as resolved.
Show resolved Hide resolved
extensionId: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The extension id.' };
providerId: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The provider id.' };
};
this.telemetryService.publicLog2<{ extensionId: string; providerId: string }, AuthProviderUsageClassification>('authentication.providerUsage', { providerId, extensionId });

Expand Down
Expand Up @@ -42,10 +42,12 @@ export interface IAutomaticLanguageDetectionLikelyWrongData {
}

export type AutomaticLanguageDetectionLikelyWrongClassification = {
currentLanguageId: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' };
nextLanguageId: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' };
lineCount: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; isMeasurement: true };
modelPreference: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' };
owner: 'TylerLeonhardt,JacksonKearl';
comment: 'Used to determine how often language detection is likely wrong.';
currentLanguageId: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The language id we guessed.' };
nextLanguageId: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The language id the user chose.' };
lineCount: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; isMeasurement: true; comment: 'The number of lines in the file.' };
modelPreference: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'What the user\'s model preference is.' };
};

export const LanguageDetectionStatsId = 'automaticlanguagedetection.stats';
Expand All @@ -57,9 +59,11 @@ export interface ILanguageDetectionStats {
}

export type LanguageDetectionStatsClassification = {
languages: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' };
confidences: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' };
timeSpent: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' };
owner: 'TylerLeonhardt,JacksonKearl';
comment: 'Used to determine how definitive language detection is and how long it takes.';
languages: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The languages the model supports.' };
confidences: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'The confidences of those languages.' };
timeSpent: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'How long the operation took.' };
};

//#endregion