Skip to content
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 thread state as attribute to process.runtime.jvm.threads.count #7006

Closed
gabrielgiussi opened this issue Oct 28, 2022 · 3 comments
Closed
Labels
enhancement New feature or request

Comments

@gabrielgiussi
Copy link

The current process.runtime.jvm.threads.count metric exported by the agent (or manually using Threads#registerObservers directly) only has as an attribute if corresponds to deamon threads or not, but knowing how many threads are in a particular state is also important.

We could include the state attribute to the existing metric process.runtime.jvm.threads.count or create a new one, IMO adding to the existing one makes more sense because otherwise it would be confusing having two metrics measuring the same with different attributes.

If you are ok with this change I can work on the PR.

@trask
Copy link
Member

trask commented Nov 22, 2022

hey @gabrielgiussi!

We could include the state attribute to the existing metric process.runtime.jvm.threads.count

this makes sense to me

the place to start would be proposing an update to the specification at https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/semantic_conventions/runtime-environment-metrics.md#jvm-metrics

cc @jack-berg @jonatan-ivanov @tuhao1020

@jonatan-ivanov
Copy link
Member

Sounds like a good idea to me.
Please attach the javadoc about the thread states to the specs in your PR: https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.State.html

@mateuszrzeszutek
Copy link
Member

Closing as won't do -- see the discussion in #7636 for the reason why we're not planning to implement this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
4 participants