Skip to content

Commit 6af55a0

Browse files
committed
fix(amazonqFeatureDev): update telemetry based on comments
1 parent 94e2c97 commit 6af55a0

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
@@ -71,9 +71,10 @@ function registerNewFiles(
7171
workspaceFolderPrefixes === undefined ? '' : zipFilePath.substring(0, zipFilePath.indexOf(path.sep))
7272
const folder = workspaceFolderPrefixes === undefined ? workspaceFolders[0] : workspaceFolderPrefixes[prefix]
7373
if (folder === undefined) {
74-
telemetry.amazonq_wsOrphanedDocuments.emit({
74+
telemetry.amazonq_trackScenarioCountUsage.emit({
7575
amazonqConversationId: conversationId,
7676
credentialStartUrl: AuthUtil.instance.startUrl,
77+
scenarioType: 'wsOrphanedDocuments',
7778
})
7879
getLogger().error(`No workspace folder found for file: ${zipFilePath} and prefix: ${prefix}`)
7980
continue

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

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,12 @@
315315
"name": "totalFiles",
316316
"type": "int",
317317
"description": "The total number of files being sent to Amazon Q"
318+
},
319+
{
320+
"name": "scenarioType",
321+
"type": "string",
322+
"allowedValues": ["wsOrphanedDocuments"],
323+
"description": "Scenarios to count in telemetry"
318324
}
319325
],
320326
"metrics": [
@@ -940,16 +946,21 @@
940946
]
941947
},
942948
{
943-
"name": "amazonq_wsOrphanedDocuments",
944-
"description": "LLM generated orphaned documents for workspace scenario. This is useful to track how many times this is reached.",
949+
"name": "amazonq_trackScenarioCountUsage",
950+
"description": "Count how many times a scenario is reached.",
945951
"unit": "Count",
946952
"metadata": [
947953
{
948-
"type": "amazonqConversationId"
954+
"type": "amazonqConversationId",
955+
"required": true
949956
},
950957
{
951958
"type": "credentialStartUrl",
952959
"required": false
960+
},
961+
{
962+
"type": "scenarioType",
963+
"required": true
953964
}
954965
]
955966
},

0 commit comments

Comments
 (0)