include silent for notifications:actionExecuted

This commit is contained in:
isidor 2021-04-22 16:55:28 +02:00
parent f6c4607367
commit a217409e38
No known key found for this signature in database
GPG key ID: F9280366A8370105

View file

@ -149,12 +149,15 @@ export class CopyNotificationMessageAction extends Action {
interface NotificationActionMetrics {
id: string;
actionLabel: string;
source: string | undefined;
source: string;
silent: boolean;
}
type NotificationActionMetricsClassification = {
id: { classification: 'SystemMetaData', purpose: 'FeatureInsight' };
actionLabel: { classification: 'SystemMetaData', purpose: 'FeatureInsight' };
source: { classification: 'SystemMetaData', purpose: 'FeatureInsight' };
silent: { classification: 'SystemMetaData', purpose: 'FeatureInsight' };
};
export class NotificationActionRunner extends ActionRunner {
@ -170,7 +173,7 @@ export class NotificationActionRunner extends ActionRunner {
this.telemetryService.publicLog2<WorkbenchActionExecutedEvent, WorkbenchActionExecutedClassification>('workbenchActionExecuted', { id: action.id, from: 'message' });
if (context) {
// If the context is not present it is a "global" notification action. Will be captured by other events
this.telemetryService.publicLog2<NotificationActionMetrics, NotificationActionMetricsClassification>('notification:actionExecuted', { id: hash(context.message.original.toString()).toString(), actionLabel: action.label, source: context.sourceId });
this.telemetryService.publicLog2<NotificationActionMetrics, NotificationActionMetricsClassification>('notification:actionExecuted', { id: hash(context.message.original.toString()).toString(), actionLabel: action.label, source: context.sourceId || 'core', silent: context.silent });
}
// Run and make sure to notify on any error again