Skip to content

Commit 5284763

Browse files
committed
telemtry: implement telemetry for amazonQLSP
1 parent c7b97e2 commit 5284763

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

packages/amazonq/src/lsp/activation.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,14 @@ import vscode from 'vscode'
77
import { startLanguageServer } from './client'
88
import { AmazonQLSPResolver } from './lspInstaller'
99
import { ToolkitError } from 'aws-core-vscode/shared'
10+
import { lspSetupStage } from 'aws-core-vscode/amazonq'
1011

1112
export async function activate(ctx: vscode.ExtensionContext): Promise<void> {
1213
try {
13-
const installResult = await new AmazonQLSPResolver().resolve()
14-
await startLanguageServer(ctx, installResult.resourcePaths)
14+
await lspSetupStage('all', async () => {
15+
const installResult = await new AmazonQLSPResolver().resolve()
16+
await lspSetupStage('launch', async () => await startLanguageServer(ctx, installResult.resourcePaths))
17+
})
1518
} catch (err) {
1619
const e = err as ToolkitError
1720
void vscode.window.showInformationMessage(`Unable to launch amazonq language server: ${e.message}`)

packages/core/src/amazonq/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export {
1717
} from './onboardingPage/walkthrough'
1818
export { LspController } from './lsp/lspController'
1919
export { LspClient } from './lsp/lspClient'
20+
export { lspSetupStage } from './lsp/util'
2021
export { api } from './extApi'
2122
export { AmazonQChatViewProvider } from './webview/webView'
2223
export { init as cwChatAppInit } from '../codewhispererChat/app'

0 commit comments

Comments
 (0)