Skip to content

Commit b3060cc

Browse files
committed
fix(amazonqFeatureDev): update telemetry based on comments
1 parent 4e108ee commit b3060cc

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
@@ -320,6 +320,12 @@
320320
"name": "traceId",
321321
"type": "string",
322322
"description": "The unique identifier of a trace"
323+
},
324+
{
325+
"name": "scenarioType",
326+
"type": "string",
327+
"allowedValues": ["wsOrphanedDocuments"],
328+
"description": "Scenarios to count in telemetry"
323329
}
324330
],
325331
"metrics": [
@@ -945,16 +951,21 @@
945951
]
946952
},
947953
{
948-
"name": "amazonq_wsOrphanedDocuments",
949-
"description": "LLM generated orphaned documents for workspace scenario. This is useful to track how many times this is reached.",
954+
"name": "amazonq_trackScenarioCountUsage",
955+
"description": "Count how many times a scenario is reached.",
950956
"unit": "Count",
951957
"metadata": [
952958
{
953-
"type": "amazonqConversationId"
959+
"type": "amazonqConversationId",
960+
"required": true
954961
},
955962
{
956963
"type": "credentialStartUrl",
957964
"required": false
965+
},
966+
{
967+
"type": "scenarioType",
968+
"required": true
958969
}
959970
]
960971
},

0 commit comments

Comments
 (0)