Skip to content

Commit 9b10d92

Browse files
committed
fix(amazonqFeatureDev): update telemetry based on comments
1 parent 9538310 commit 9b10d92

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

packages/core/src/amazonqFeatureDev/session/sessionState.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,10 @@ function registerNewFiles(
7777
Object.values(workspaceFolderPrefixes).find((val) => val.index === 0)?.name ?? ''
7878
]
7979
if (folder === undefined) {
80-
telemetry.amazonq_wsOrphanedDocuments.emit({
80+
telemetry.amazonq_trackScenarioCountUsage.emit({
8181
amazonqConversationId: conversationId,
8282
credentialStartUrl: AuthUtil.instance.startUrl,
83+
scenarioType: 'wsOrphanedDocuments',
8384
})
8485
getLogger().error(`No workspace folder found for file: ${zipFilePath} and prefix: ${prefix}`)
8586
continue

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

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,12 @@
341341
"name": "amazonqMessageDisplayedMs",
342342
"type": "int",
343343
"description": "Duration between the partner teams code receiving the message and when the message was finally displayed in ms"
344+
},
345+
{
346+
"name": "scenarioType",
347+
"type": "string",
348+
"allowedValues": ["wsOrphanedDocuments"],
349+
"description": "Scenarios to count in telemetry"
344350
}
345351
],
346352
"metrics": [
@@ -970,16 +976,21 @@
970976
]
971977
},
972978
{
973-
"name": "amazonq_wsOrphanedDocuments",
974-
"description": "LLM generated orphaned documents for workspace scenario. This is useful to track how many times this is reached.",
979+
"name": "amazonq_trackScenarioCountUsage",
980+
"description": "Count how many times a scenario is reached.",
975981
"unit": "Count",
976982
"metadata": [
977983
{
978-
"type": "amazonqConversationId"
984+
"type": "amazonqConversationId",
985+
"required": true
979986
},
980987
{
981988
"type": "credentialStartUrl",
982989
"required": false
990+
},
991+
{
992+
"type": "scenarioType",
993+
"required": true
983994
}
984995
]
985996
},

0 commit comments

Comments
 (0)