Skip to content

Commit 7333d71

Browse files
authored
telemetry(amazonq): add vectorIndexEnabled boolean to workspace index telemetry (aws#6720)
## Problem We do not know the % of users who has vector index enabled. ## Solution Add a boolean flag for whether vector index is enabled. --- - Treat all work as PUBLIC. Private `feature/x` branches will not be squash-merged at release time. - Your code changes must meet the guidelines in [CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines). - License: I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent 6d5ec44 commit 7333d71

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

packages/core/src/amazonq/lsp/lspController.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,7 @@ export class LspController {
357357
amazonqIndexMemoryUsageInMB: usage ? usage.memoryUsage / (1024 * 1024) : undefined,
358358
amazonqIndexCpuUsagePercentage: usage ? usage.cpuUsage : undefined,
359359
amazonqIndexFileSizeInMB: totalSizeBytes / (1024 * 1024),
360+
amazonqVectorIndexEnabled: buildIndexConfig.isVectorIndexEnabled,
360361
credentialStartUrl: buildIndexConfig.startUrl,
361362
})
362363
} else {
@@ -366,6 +367,7 @@ export class LspController {
366367
result: 'Failed',
367368
amazonqIndexFileCount: 0,
368369
amazonqIndexFileSizeInMB: 0,
370+
amazonqVectorIndexEnabled: buildIndexConfig.isVectorIndexEnabled,
369371
reason: `Unknown`,
370372
})
371373
}
@@ -377,6 +379,7 @@ export class LspController {
377379
result: 'Failed',
378380
amazonqIndexFileCount: 0,
379381
amazonqIndexFileSizeInMB: 0,
382+
amazonqVectorIndexEnabled: buildIndexConfig.isVectorIndexEnabled,
380383
reason: `${error instanceof Error ? error.name : 'Unknown'}`,
381384
reasonDesc: `Error when building index. ${error instanceof Error ? error.message : error}`,
382385
})

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,11 @@
5252
"type": "int",
5353
"description": "The sum of file sizes that were indexed in MB"
5454
},
55+
{
56+
"name": "amazonqVectorIndexEnabled",
57+
"type": "boolean",
58+
"description": "True if vector index is enabled"
59+
},
5560
{
5661
"name": "amazonqIndexFileCount",
5762
"type": "int",
@@ -624,6 +629,10 @@
624629
{
625630
"type": "credentialStartUrl",
626631
"required": false
632+
},
633+
{
634+
"type": "amazonqVectorIndexEnabled",
635+
"required": false
627636
}
628637
]
629638
},

0 commit comments

Comments
 (0)