Skip to content

Commit 35c1ac1

Browse files
committed
feat(amazonq): emit flare telemetry events
1 parent 3b619b0 commit 35c1ac1

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packages/amazonq/src/lsp/chat/messages.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ import { AmazonQChatViewProvider } from './webviewProvider'
5656
import { AuthUtil } from 'aws-core-vscode/codewhisperer'
5757
import { AmazonQPromptSettings, messages, openUrl } from 'aws-core-vscode/shared'
5858
import { DefaultAmazonQAppInitContext, messageDispatcher, EditorContentController } from 'aws-core-vscode/amazonq'
59+
import { telemetry, TelemetryBase } from 'aws-core-vscode/telemetry'
5960

6061
export function registerLanguageServerEventListener(languageClient: LanguageClient, provider: AmazonQChatViewProvider) {
6162
languageClient.info(
@@ -78,7 +79,11 @@ export function registerLanguageServerEventListener(languageClient: LanguageClie
7879
})
7980

8081
languageClient.onTelemetry((e) => {
81-
languageClient.info(`[VSCode Client] Received telemetry event from server ${JSON.stringify(e)}`)
82+
const telemetryName: string = e.name
83+
84+
if (telemetryName in telemetry) {
85+
telemetry[telemetryName as keyof TelemetryBase].emit(e.data)
86+
}
8287
})
8388
}
8489

0 commit comments

Comments
 (0)