-
Notifications
You must be signed in to change notification settings - Fork 275
Fix metric for viewing Q auth webview #5061
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
119d32f
9c40c09
78156a7
cf2062a
f09231a
0b31d57
244a198
d1643fb
b937967
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -14,6 +14,9 @@ | |||||||||||||||||||
| import software.aws.toolkits.core.utils.getLogger | ||||||||||||||||||||
| import software.aws.toolkits.core.utils.info | ||||||||||||||||||||
| import software.aws.toolkits.core.utils.warn | ||||||||||||||||||||
| import software.aws.toolkits.jetbrains.core.credentials.ToolkitConnection | ||||||||||||||||||||
| import software.aws.toolkits.jetbrains.core.credentials.ToolkitConnectionManager | ||||||||||||||||||||
| import software.aws.toolkits.jetbrains.core.credentials.pinning.QConnection | ||||||||||||||||||||
| import software.aws.toolkits.jetbrains.services.codewhisperer.credentials.CodeWhispererClientAdaptor | ||||||||||||||||||||
| import software.aws.toolkits.jetbrains.services.codewhisperer.customization.CodeWhispererCustomization | ||||||||||||||||||||
| import software.aws.toolkits.jetbrains.services.codewhisperer.customization.CodeWhispererModelConfigurator | ||||||||||||||||||||
|
|
@@ -29,6 +32,7 @@ | |||||||||||||||||||
| import software.aws.toolkits.jetbrains.settings.CodeWhispererSettings | ||||||||||||||||||||
| import software.aws.toolkits.jetbrains.utils.notifyError | ||||||||||||||||||||
| import software.aws.toolkits.resources.message | ||||||||||||||||||||
| import software.aws.toolkits.telemetry.AuthTelemetry | ||||||||||||||||||||
|
Check warning on line 35 in plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/cwc/controller/chat/telemetry/TelemetryHelper.kt
|
||||||||||||||||||||
Check warningCode scanning / QDJVMC Usage of redundant or deprecated syntax or deprecated symbols Warning
'AuthTelemetry' is deprecated. Use type-safe metric builders
|
||||||||||||||||||||
| import software.aws.toolkits.telemetry.CwsprChatCommandType | ||||||||||||||||||||
| import software.aws.toolkits.telemetry.CwsprChatConversationType | ||||||||||||||||||||
| import software.aws.toolkits.telemetry.CwsprChatInteractionType | ||||||||||||||||||||
|
|
@@ -410,12 +414,22 @@ | |||||||||||||||||||
| companion object { | ||||||||||||||||||||
| private val logger = getLogger<TelemetryHelper>() | ||||||||||||||||||||
|
|
||||||||||||||||||||
| fun recordOpenChat() { | ||||||||||||||||||||
| private fun getQConnection(project: Project): ToolkitConnection? = ToolkitConnectionManager.getInstance( | ||||||||||||||||||||
| project | ||||||||||||||||||||
| ).activeConnectionForFeature(QConnection.getInstance()) | ||||||||||||||||||||
|
Check warning on line 419 in plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/cwc/controller/chat/telemetry/TelemetryHelper.kt
|
||||||||||||||||||||
|
|
||||||||||||||||||||
| fun recordOpenChat(project: Project) { | ||||||||||||||||||||
| Telemetry.amazonq.openChat.use { it.passive(true) } | ||||||||||||||||||||
| if (getQConnection(project) == null) { | ||||||||||||||||||||
| AuthTelemetry.signInPageOpened() | ||||||||||||||||||||
|
Check warning on line 424 in plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/cwc/controller/chat/telemetry/TelemetryHelper.kt
|
||||||||||||||||||||
|
||||||||||||||||||||
| } | ||||||||||||||||||||
|
Comment on lines
422
to
+425
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should this be
Suggested change
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it looks like vsc emits these separately. openChat is ambiguously: "When user opens CWSPR chat panel". separating these metrics would make open/close chat a little more meaningful. |
||||||||||||||||||||
| } | ||||||||||||||||||||
|
|
||||||||||||||||||||
| fun recordCloseChat() { | ||||||||||||||||||||
| fun recordCloseChat(project: Project) { | ||||||||||||||||||||
| Telemetry.amazonq.closeChat.use { it.passive(true) } | ||||||||||||||||||||
| if (getQConnection(project) == null) { | ||||||||||||||||||||
| AuthTelemetry.signInPageClosed() | ||||||||||||||||||||
|
Check warning on line 431 in plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/cwc/controller/chat/telemetry/TelemetryHelper.kt
|
||||||||||||||||||||
Check warningCode scanning / QDJVMC Usage of redundant or deprecated syntax or deprecated symbols Warning
'AuthTelemetry' is deprecated. Use type-safe metric builders
|
||||||||||||||||||||
| } | ||||||||||||||||||||
| } | ||||||||||||||||||||
|
|
||||||||||||||||||||
| fun recordTelemetryChatRunCommand(type: CwsprChatCommandType, name: String? = null, startUrl: String? = null) { | ||||||||||||||||||||
|
|
||||||||||||||||||||
Check warning
Code scanning / QDJVMC
Usage of redundant or deprecated syntax or deprecated symbols Warning