mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-17 15:24:40 +01:00
Telemetry: annotate my telemetry events (fix microsoft/vscode-internalbacklog#2768)
This commit is contained in:
@@ -1059,11 +1059,11 @@ export class CodeApplication extends Disposable {
|
||||
|
||||
// Telemetry
|
||||
type SharedProcessErrorClassification = {
|
||||
type: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true };
|
||||
reason: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true };
|
||||
code: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true };
|
||||
visible: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true };
|
||||
shuttingdown: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true };
|
||||
type: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true; owner: 'bpasero'; comment: 'The type of shared process crash to understand the nature of the crash better.' };
|
||||
reason: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true; owner: 'bpasero'; comment: 'The type of shared process crash to understand the nature of the crash better.' };
|
||||
code: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true; owner: 'bpasero'; comment: 'The type of shared process crash to understand the nature of the crash better.' };
|
||||
visible: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true; owner: 'bpasero'; comment: 'Whether shared process window was visible or not.' };
|
||||
shuttingdown: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true; owner: 'bpasero'; comment: 'Whether the application is shutting down when the crash happens.' };
|
||||
};
|
||||
type SharedProcessErrorEvent = {
|
||||
type: WindowError;
|
||||
|
||||
@@ -514,9 +514,9 @@ export class CodeWindow extends Disposable implements ICodeWindow {
|
||||
|
||||
// Telemetry
|
||||
type WindowErrorClassification = {
|
||||
type: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true };
|
||||
reason: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true };
|
||||
code: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true };
|
||||
type: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true; owner: 'bpasero'; comment: 'The type of window crash to understand the nature of the crash better.' };
|
||||
reason: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true; owner: 'bpasero'; comment: 'The reason of the window crash to understand the nature of the crash better.' };
|
||||
code: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true; owner: 'bpasero'; comment: 'The exit code of the window process to understand the nature of the crash better' };
|
||||
};
|
||||
type WindowErrorEvent = {
|
||||
type: WindowError;
|
||||
|
||||
@@ -961,7 +961,6 @@ function registerCloseEditorCommands() {
|
||||
ext: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' };
|
||||
from: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' };
|
||||
to: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' };
|
||||
|
||||
};
|
||||
|
||||
type WorkbenchEditorReopenEvent = {
|
||||
|
||||
@@ -154,10 +154,10 @@ interface NotificationActionMetrics {
|
||||
}
|
||||
|
||||
type NotificationActionMetricsClassification = {
|
||||
id: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' };
|
||||
actionLabel: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' };
|
||||
source: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' };
|
||||
silent: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' };
|
||||
id: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; owner: 'bpasero'; comment: 'The identifier of the action that was run from a notification.' };
|
||||
actionLabel: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; owner: 'bpasero'; comment: 'The label of the action that was run from a notification.' };
|
||||
source: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; owner: 'bpasero'; comment: 'The source of the notification where an action was run.' };
|
||||
silent: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; owner: 'bpasero'; comment: 'Whether the notification where an action was run is silent or not.' };
|
||||
};
|
||||
|
||||
export class NotificationActionRunner extends ActionRunner {
|
||||
|
||||
@@ -45,31 +45,31 @@ export class NotificationsAlerts extends Disposable {
|
||||
}
|
||||
}
|
||||
|
||||
private triggerAriaAlert(notifiation: INotificationViewItem): void {
|
||||
if (notifiation.silent) {
|
||||
private triggerAriaAlert(notification: INotificationViewItem): void {
|
||||
if (notification.silent) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Trigger the alert again whenever the message changes
|
||||
const listener = notifiation.onDidChangeContent(e => {
|
||||
const listener = notification.onDidChangeContent(e => {
|
||||
if (e.kind === NotificationViewItemContentChangeKind.MESSAGE) {
|
||||
this.doTriggerAriaAlert(notifiation);
|
||||
this.doTriggerAriaAlert(notification);
|
||||
}
|
||||
});
|
||||
|
||||
Event.once(notifiation.onDidClose)(() => listener.dispose());
|
||||
Event.once(notification.onDidClose)(() => listener.dispose());
|
||||
|
||||
this.doTriggerAriaAlert(notifiation);
|
||||
this.doTriggerAriaAlert(notification);
|
||||
}
|
||||
|
||||
private doTriggerAriaAlert(notifiation: INotificationViewItem): void {
|
||||
private doTriggerAriaAlert(notification: INotificationViewItem): void {
|
||||
let alertText: string;
|
||||
if (notifiation.severity === Severity.Error) {
|
||||
alertText = localize('alertErrorMessage', "Error: {0}", notifiation.message.linkedText.toString());
|
||||
} else if (notifiation.severity === Severity.Warning) {
|
||||
alertText = localize('alertWarningMessage', "Warning: {0}", notifiation.message.linkedText.toString());
|
||||
if (notification.severity === Severity.Error) {
|
||||
alertText = localize('alertErrorMessage', "Error: {0}", notification.message.linkedText.toString());
|
||||
} else if (notification.severity === Severity.Warning) {
|
||||
alertText = localize('alertWarningMessage', "Warning: {0}", notification.message.linkedText.toString());
|
||||
} else {
|
||||
alertText = localize('alertInfoMessage', "Info: {0}", notifiation.message.linkedText.toString());
|
||||
alertText = localize('alertInfoMessage', "Info: {0}", notification.message.linkedText.toString());
|
||||
}
|
||||
|
||||
alert(alertText);
|
||||
|
||||
@@ -16,9 +16,9 @@ export interface NotificationMetrics {
|
||||
}
|
||||
|
||||
export type NotificationMetricsClassification = {
|
||||
id: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' };
|
||||
silent: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' };
|
||||
source?: { classification: 'SystemMetaData'; purpose: 'FeatureInsight' };
|
||||
id: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; owner: 'bpasero'; comment: 'The identifier of the source of the notification.' };
|
||||
silent: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; owner: 'bpasero'; comment: 'Whethe the notification is silent or not.' };
|
||||
source?: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; owner: 'bpasero'; comment: 'The source of the notification.' };
|
||||
};
|
||||
|
||||
export function notificationToMetrics(message: NotificationMessage, source: string | undefined, silent: boolean): NotificationMetrics {
|
||||
|
||||
Reference in New Issue
Block a user