-
Notifications
You must be signed in to change notification settings - Fork 183
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
Enhancement of JVM Thread metrics #101
Comments
Hey @lenin-jaganathan ,
We've previously discussed this in the Java instrumentation SIG (see open-telemetry/opentelemetry-java-instrumentation#7006 and open-telemetry/opentelemetry-java-instrumentation#7636) and came to a conclusion that there is no good reason to include thread state. |
Thanks for sharing this @mateuszrzeszutek. Also, is there any discussion for ThreadMXBean.html#getTotalStartedThreadCount that you are ware of? |
the JVM runtime metrics WG isn't considering any additions until the JVM runtime metrics have been marked stable Adding opt-in metric attributes, and adding new metrics are both things that can be added post-stability. |
@trask Thanks for the response. I just wanted to kick start a conversation on this since this seems like a useful metric to have. Also, are there any tentative timelines around stability? |
I realized that since adding new dimensions to a metric is considered a breaking semconv change, we should probably make a decision on this pre-stability |
I would like to propose a possible use case. For example, if we have a dashboard that displays the jvm.thread.count metric as a line chart, and there is a thread.state dimension. When an application is abnormal or during our routine inspections, we can check the dashboard and may notice that the number of blocked/waiting threads is abnormal. This gives us a direction to investigate the problem, and then we can use other tools to perform more detailed analysis. |
+1 on @aheling11's comment. And this has proved very effective in the past. And so is "the rate of thread creation" to understand the behaviors of services and identify ineffective use of resources. This is more useful when we consider more than one service and monitor at infrastructure level. |
We record the thread state but use the attributes advice exclude recording it by default. That would allow users to opt into the attribute but avoid the extra dimensions by default. |
@jonatan-ivanov does micrometer report thread state as a dimension? |
@trask Yes, in Prometheus format it looks like this:
|
My $0.02 - I think this is a good idea. Having the state as a dimension provides quite a bit of insight. |
Discussed in Java SIG, consensus is to add |
Currently OTEL sem conv for process.runtime.jvm includes the below metric to observe the number of threads,
semantic-conventions/specification/metrics/semantic_conventions/runtime-environment-metrics.md
Lines 240 to 258 in 8fc3d03
I would like to propose an enhancement for these metrics/ add additional metrics about the threads,
The text was updated successfully, but these errors were encountered: