Skip to content

Commit 7afbc71

Browse files
authored
telemetry(amazonq): correct auth_userState telemetry (#7108)
We introduced a new auth state `pendingProfileSelection`, however the current code path will determine the connectivity to be `disconnected` and thus we observe a drastic drop of `connected` users and increase of `disconnected`. ## Problem ## Solution --- - 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 672e95f commit 7afbc71

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/amazonq/src/extensionNode.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,11 @@ async function getAuthState(): Promise<Omit<AuthUserState, 'source'>> {
112112
getLogger().error(`Current Amazon Q connection is not SSO, type is: %s`, currConn?.type)
113113
}
114114

115+
// Pending profile selection state means users already log in with Sso service
116+
if (authState === 'pendingProfileSelection') {
117+
authState = 'connected'
118+
}
119+
115120
return {
116121
authStatus:
117122
authState === 'connected' || authState === 'expired' || authState === 'connectedWithNetworkError'

0 commit comments

Comments
 (0)