Skip to content

Commit f6f3ccd

Browse files
Merge master into feature/emr
2 parents 00cd0a7 + 1085a8d commit f6f3ccd

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

packages/amazonq/src/lsp/client.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ import { processUtils } from 'aws-core-vscode/shared'
3939
import { activate } from './chat/activation'
4040
import { AmazonQResourcePaths } from './lspInstaller'
4141
import { ConfigSection, isValidConfigSection, toAmazonQLSPLogLevel } from './config'
42+
import { telemetry } from 'aws-core-vscode/telemetry'
4243

4344
const localize = nls.loadMessageBundle()
4445
const logger = getLogger('amazonqLsp.lspClient')
@@ -288,6 +289,12 @@ function onServerRestartHandler(client: LanguageClient, auth: AmazonQLspAuth) {
288289
return
289290
}
290291

292+
// Emit telemetry that a crash was detected.
293+
// It is not guaranteed to 100% be a crash since somehow the server may have been intentionally restarted,
294+
// but most of the time it probably will have been due to a crash.
295+
// TODO: Port this metric override to common definitions
296+
telemetry.languageServer_crash.emit({ id: 'AmazonQ' })
297+
291298
// Need to set the auth token in the again
292299
await auth.refreshConnection(true)
293300
})

packages/core/src/shared/telemetry/vscodeTelemetry.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1019,6 +1019,15 @@
10191019
}
10201020
]
10211021
},
1022+
{
1023+
"name": "languageServer_crash",
1024+
"description": "Called when a language server crash is detected. TODO: Port this to common",
1025+
"metadata": [
1026+
{
1027+
"type": "id"
1028+
}
1029+
]
1030+
},
10221031
{
10231032
"name": "ide_heartbeat",
10241033
"description": "A heartbeat sent by the extension",

0 commit comments

Comments
 (0)