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

draft: add jvm.fd.open and jvm.runtime.uptime to jmx configs #1665

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

schmikei
Copy link

Description:

WIP:

  • adding jvm.runtime.uptime and jvm.fd.open to the jvm collectors

Existing Issue(s):

< Link any applicable issues. >

Testing:

< Describe what testing was performed and any tests were added. >

Documentation:

< Describe the documentation added.
Please be sure to modify relevant existing documentation if needed. >

Outstanding items:

< Anything that these changes are intentionally missing
that will be needed or can be helpful in the future. >

@SylvainJuge
Copy link
Contributor

This PR adds metrics to the "JMX Gatherer", which should be replaced in a near/medium future with the new "JMX scraper".

When adding new metrics, you should also add them to the new YAML definitions https://github.com/open-telemetry/opentelemetry-java-contrib/blob/main/jmx-scraper/src/main/resources/jvm.yaml and also modify the related tests.

Also, adding those metrics to the "JMX Insight" feature of instrumentation would be nice to capture consistent metrics when using either of those implementations (Contrib JMX Gatherer, Contrib JMX Scraper or Instrumentation JMX Insights).

Last but not least, I haven't seen those metrics being defined in the Java runtime semconv. While the JMX metrics are currently not defined in semconv and are not strictly required to be, having at least some alignment with the current ones would help to provide a consistent experience and could help making them part of semconv later.

@trask
Copy link
Member

trask commented Jan 23, 2025

adding jvm.runtime.uptime and jvm.fd.open to the jvm collectors

can you open an issue in https://github.com/open-telemetry/semantic-conventions to suggest these? it could probably use some discussion over there to align with naming conventions

@schmikei
Copy link
Author

Apologies coming from mostly the golang Otel contribution side so still getting my bearings here.

Seems like there was already some pre-discussion/consolidation on the approach for cpu time of the jvm process already
open-telemetry/opentelemetry-specification#3490

I'll probably do some issue creating for https://docs.oracle.com/en/java/javase/17/docs/api/jdk.management/com/sun/management/UnixOperatingSystemMXBean.html#getOpenFileDescriptorCount() as that seems like a new use case but want to do my due diligence and see if anything was created in similar veins/familiarize myself a tad bit more.

Thanks for taking a look at the draft and giving some guidance though 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants