Skip to content

Commit 13c8cd0

Browse files
committed
remove TelemetryOverride definition and use common's telemetry function instead
1 parent 2d053c5 commit 13c8cd0

File tree

2 files changed

+7
-32
lines changed

2 files changed

+7
-32
lines changed

plugins/core/jetbrains-community/resources/telemetryOverride.json

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -749,25 +749,6 @@
749749
}
750750
]
751751
},
752-
{
753-
"name": "auth_userState",
754-
"description": "The state of the user's authentication.",
755-
"metadata": [
756-
{
757-
"type": "source",
758-
"required": true
759-
},
760-
{
761-
"type": "authStatus",
762-
"required": true
763-
},
764-
{
765-
"type": "authEnabledConnections",
766-
"required": true
767-
}
768-
],
769-
"passive": true
770-
},
771752
{
772753
"name": "webview_amazonqSignInOpened",
773754
"description": "Called when a Amazon Q sign in webview is opened.",

plugins/core/jetbrains-community/src/software/aws/toolkits/jetbrains/core/gettingstarted/GettingStartedAuthUtils.kt

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -233,19 +233,13 @@ fun reauthenticateWithQ(project: Project) {
233233
}
234234

235235
fun emitUserState(project: Project) {
236-
237-
TelemetryService.getInstance().record(project) {
238-
datum("auth_userState") {
239-
createTime(Instant.now())
240-
unit(Unit.NONE)
241-
value(1.0)
242-
passive(true)
243-
metadata("source", getStartupState().toString())
244-
metadata("authStatus", getAuthStatus(project).toString())
245-
metadata("authEnabledConnections", getEnabledConnections(project))
246-
metadata("authScopes", getAuthScopes(project))
247-
}
248-
}
236+
AuthTelemetry.userState(
237+
project,
238+
authEnabledConnections = getEnabledConnections(project),
239+
authScopes = getAuthScopes(project),
240+
authStatus = getAuthStatus(project),
241+
source = getStartupState().toString()
242+
)
249243
}
250244

251245
const val CODEWHISPERER_AUTH_LEARN_MORE_LINK = "https://docs.aws.amazon.com/codewhisperer/latest/userguide/codewhisperer-auth.html"

0 commit comments

Comments
 (0)