-
Notifications
You must be signed in to change notification settings - Fork 220
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
Telemetry: Emit session_start during startup activities #4981
base: main
Are you sure you want to change the base?
Conversation
companion object { | ||
private var runOnce = AtomicBoolean(false) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
take a look at RunOnceUtil
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
didnt know that existed thanks
|
||
class AwsToolkitStartupMetrics : ProjectActivity { | ||
override suspend fun execute(project: Project) { | ||
RunOnceUtil.runOnceForApp(taskId) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
consider:
RunOnceUtil.runOnceForApp(taskId) { | |
RunOnceUtil.runOnceForApp(this::class.qualifiedName) { |
@@ -195,6 +195,7 @@ | |||
<statusBarWidgetFactory id="AwsSettingsPanel" implementation="software.aws.toolkits.jetbrains.core.credentials.AwsSettingsPanelInstaller"/> | |||
<statusBarWidgetFactory id="CawsSpaceProjectInfo" implementation="software.aws.toolkits.jetbrains.services.caws.CawsStatusBarInstaller"/> | |||
|
|||
<postStartupActivity implementation="software.aws.toolkits.jetbrains.services.telemetry.AwsToolkitStartupMetrics" order="first"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we should skip the order here? Would it interfere with any other JB specific activities?
Qodana Community for JVMIt seems all right 👌 No new problems were found according to the checks applied 💡 Qodana analysis was run in the pull request mode: only the changed files were checked Contact Qodana teamContact us at [email protected]
|
Types of changes
Description
"session_start: this metric is emitted upon starting of the toolkit. This could be because of update, reloads or installation."
Added a new routine to post-startup activities to emit session start before other tasks run.
Checklist
License
I confirm that my contribution is made under the terms of the Apache 2.0 license.