-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Add metrics for the total number of application threads started in the JVM #3562
Add metrics for the total number of application threads started in the JVM #3562
Conversation
lenin-jaganathan
commented
Dec 9, 2022
•
edited
Loading
edited
- generate a metric for total Threads started since the JVM start time. This is extremely useful to understand how an application is doing on thread creation and also understand the creation patterns. The existing metrics give the current status of threads but nothing about whether the threads are created newly or are existing ones. This metric will aid in such scenarios by taking deltas.
3c3eaf1
to
b4c213f
Compare
b4c213f
to
ad094ad
Compare
340c3aa
to
b184e44
Compare
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.
We should add tests for the changes in JvmGcMetrics
but as I said I might move those to a separate PR.
micrometer-core/src/main/java/io/micrometer/core/instrument/binder/jvm/JvmGcMetrics.java
Outdated
Show resolved
Hide resolved
micrometer-core/src/main/java/io/micrometer/core/instrument/binder/jvm/JvmThreadMetrics.java
Outdated
Show resolved
Hide resolved
micrometer-core/src/main/java/io/micrometer/core/instrument/binder/jvm/JvmThreadMetrics.java
Outdated
Show resolved
Hide resolved
micrometer-core/src/main/java/io/micrometer/core/instrument/binder/jvm/JvmThreadMetrics.java
Outdated
Show resolved
Hide resolved
Could you please rebase this on |
I was thinking of Loom and the usefulness of this for virtual thread. Also if it is possible to distinguish between virtual and non-virtual threads. |
- generate a metric for total Threads started since Jvm start time
- When observing multiple applications(which run on different java versions / use different gc's) having gc has a dimension helps in better understanding the gc metrics.
991d025
to
4e8db69
Compare
4e8db69
to
5839559
Compare
micrometer-core/src/main/java/io/micrometer/core/instrument/binder/jvm/JvmThreadMetrics.java
Outdated
Show resolved
Hide resolved
The build is failing, could you please run |
Yes on it @jonatan-ivanov . Having some trouble locally with switching branches. Will update this |
…nder/jvm/JvmThreadMetrics.java Co-authored-by: Jonatan Ivanov <jonatan.ivanov@gmail.com>
@shakuzen By any chance will this metric be available in 1.10.x versions? |
@lenin-jaganathan Since this is a new feature, not really. 1.10.x is a maintenance branch, we only release patch versions which can contain dependency upgrades and bugfixes but it is rare that they contain new features. This should go out early next week (hopefully on Monday) with |
Thanks. |