Skip to content

Commit 8235dff

Browse files
committed
telemetry(amazonq): align flare/vscode codewhisperer_serviceInvocation metric
1 parent 059a140 commit 8235dff

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

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

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ import * as vscode from 'vscode'
5757
import { Disposable, LanguageClient, Position, TextDocumentIdentifier } from 'vscode-languageclient'
5858
import * as jose from 'jose'
5959
import { AmazonQChatViewProvider } from './webviewProvider'
60-
import { AuthUtil, ReferenceLogViewProvider } from 'aws-core-vscode/codewhisperer'
60+
import { AuthUtil, CodeWhispererSettings, ReferenceLogViewProvider } from 'aws-core-vscode/codewhisperer'
6161
import { amazonQDiffScheme, AmazonQPromptSettings, messages, openUrl } from 'aws-core-vscode/shared'
6262
import {
6363
DefaultAmazonQAppInitContext,
@@ -94,6 +94,14 @@ export function registerLanguageServerEventListener(languageClient: LanguageClie
9494
const telemetryName: string = e.name
9595

9696
if (telemetryName in telemetry) {
97+
switch (telemetryName) {
98+
case 'codewhisperer_serviceInvocation': {
99+
// this feature is entirely client side right now
100+
e.data.codewhispererImportRecommendationEnabled =
101+
CodeWhispererSettings.instance.isImportRecommendationEnabled()
102+
break
103+
}
104+
}
97105
telemetry[telemetryName as keyof TelemetryBase].emit(e.data)
98106
}
99107
})

0 commit comments

Comments
 (0)