fix(telemetry): correct onboarding and token storage metrics

This commit addresses two issues with telemetry recording:

1.  The  metric was missing the  attribute, causing a TypeScript error when  was called. The  attribute has been added back to the metric definition.

2.  The  metric was being incorrectly called on every token refresh. This has been corrected by removing the calls from the token refresh listener and refactoring the valid success paths to call a new  helper function to avoid code duplication.
This commit is contained in:
Srinath Padmanabhan
2026-02-19 10:14:56 -08:00
parent ed2204ffce
commit 1a94129b09
2 changed files with 9 additions and 14 deletions
+1
View File
@@ -259,6 +259,7 @@ const COUNTER_DEFINITIONS = {
assign: (c: Counter) => (tokenStorageTypeCounter = c),
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
attributes: {} as {
type: string;
forced: boolean;
},
},