diff --git a/packages/amazonq/src/lsp/chat/messages.ts b/packages/amazonq/src/lsp/chat/messages.ts index 7365f10445a..a635386eb24 100644 --- a/packages/amazonq/src/lsp/chat/messages.ts +++ b/packages/amazonq/src/lsp/chat/messages.ts @@ -56,6 +56,7 @@ import { AmazonQChatViewProvider } from './webviewProvider' import { AuthUtil } from 'aws-core-vscode/codewhisperer' import { AmazonQPromptSettings, messages, openUrl } from 'aws-core-vscode/shared' import { DefaultAmazonQAppInitContext, messageDispatcher, EditorContentController } from 'aws-core-vscode/amazonq' +import { telemetry, TelemetryBase } from 'aws-core-vscode/telemetry' export function registerLanguageServerEventListener(languageClient: LanguageClient, provider: AmazonQChatViewProvider) { languageClient.info( @@ -78,7 +79,11 @@ export function registerLanguageServerEventListener(languageClient: LanguageClie }) languageClient.onTelemetry((e) => { - languageClient.info(`[VSCode Client] Received telemetry event from server ${JSON.stringify(e)}`) + const telemetryName: string = e.name + + if (telemetryName in telemetry) { + telemetry[telemetryName as keyof TelemetryBase].emit(e.data) + } }) }