opentelemetry-java-instrumentation
opentelemetry-java-instrumentation copied to clipboard
Add rules for basic JVM monitoring to intstrumentation/jmx-metrics
I'd like to propose adding a set of rules for reporting basic JVM metrics (GC, memory, classloaders). I've seen some of these mentioned in the README, though there's no built-in ruleset.
I've created my own basing on another otel project, and maybe this might be useful for others as well? (probably in combination with the rule sets already defined (for tomcat, kafka etc.)). Initially, I kind of expected these to be reported by default, but it turned out otherwise :) Unless there are other mechanisms for funnelling the basic JVM metrics into otel, that are preferable?
hi @adamw!
I kind of expected these to be reported by default
you should be getting these by default: https://github.com/open-telemetry/semantic-conventions/blob/main/docs/runtime/jvm-metrics.md
@trask Thanks! Do you mean these metrics should be gathered & exposed automatically - just by using the SDK (I don't think that's happening ;) )? Or that I should rename the metrics I added here to adhere to this naming convention (which I should, if they are not gathered automatically)?
(btw. - I'm not using the Java agent, but trying to initialize everything from my main method, fwiw)
Do you mean these metrics should be gathered & exposed automatically - just by using the SDK (I don't think that's happening ;) )?
Just using the SDK is not enough to get these, you'll need https://github.com/open-telemetry/opentelemetry-java-instrumentation/tree/main/instrumentation/runtime-telemetry/runtime-telemetry-java8/library
@laurit Works great, I missed that library, thank you! Closing this then :)