Skip to content

Commit f9f269e

Browse files
check if existing connections caused isFirstUse discrepancy
Before, on a users first use, it was technically possible for Q to indicate it was NOT the first use if somehow there were existing connections detected. A previous commit removed that case. But we want to now emit telemetry if we detected that we WOULD have run in to that case when not expected. Signed-off-by: nkomonen-amazon <[email protected]>
1 parent acd6b55 commit f9f269e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

packages/core/src/auth/utils.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -709,6 +709,13 @@ export class ExtensionUse {
709709

710710
if (isAmazonQ()) {
711711
this.isFirstUseCurrentSession = true
712+
if (hasExistingConnections()) {
713+
telemetry.function_call.emit({
714+
result: 'Failed',
715+
functionName: 'isFirstUse',
716+
reason: 'UnexpectedConnections',
717+
})
718+
}
712719
} else {
713720
// The variable in the store is not defined yet, fallback to checking if they have existing connections.
714721
this.isFirstUseCurrentSession = !hasExistingConnections()

0 commit comments

Comments
 (0)