From fce112281344873de4ab6fd63e8754d0b94b6ac8 Mon Sep 17 00:00:00 2001 From: Jean Pierre Date: Tue, 21 Dec 2021 05:36:55 +0000 Subject: [PATCH] Add notification telemetry --- src/vs/gitpod/node/gitpodInsightsAppender.ts | 53 ++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/src/vs/gitpod/node/gitpodInsightsAppender.ts b/src/vs/gitpod/node/gitpodInsightsAppender.ts index 3da76896578d5..51b2ed167ff66 100644 --- a/src/vs/gitpod/node/gitpodInsightsAppender.ts +++ b/src/vs/gitpod/node/gitpodInsightsAppender.ts @@ -214,6 +214,59 @@ function mapTelemetryData(eventName: string, data: any): RemoteTrackMessage | un timestamp: data.timestamp }, }; + case 'notification:show': + return { + event: 'vscode_notification', + properties: { + action: 'show', + id: data.id, + source: data.source, + workspaceId: data.workspaceId, + workspaceInstanceId: data.workspaceInstanceId, + sessionID: data.sessionID, + timestamp: data.timestamp + }, + }; + case 'notification:close': + return { + event: 'vscode_notification', + properties: { + action: 'close', + id: data.id, + source: data.source, + workspaceId: data.workspaceId, + workspaceInstanceId: data.workspaceInstanceId, + sessionID: data.sessionID, + timestamp: data.timestamp + }, + }; + case 'notification:hide': + return { + event: 'vscode_notification', + properties: { + action: 'hide', + id: data.id, + source: data.source, + workspaceId: data.workspaceId, + workspaceInstanceId: data.workspaceInstanceId, + sessionID: data.sessionID, + timestamp: data.timestamp + }, + }; + case 'notification:actionExecuted': + return { + event: 'vscode_notification', + properties: { + action: 'actionExecuted', + id: data.id, + source: data.source, + actionLabel: data.actionLabel, + workspaceId: data.workspaceId, + workspaceInstanceId: data.workspaceInstanceId, + sessionID: data.sessionID, + timestamp: data.timestamp + }, + }; } return undefined;