-
Notifications
You must be signed in to change notification settings - Fork 868
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
Enable using JMX Metrics instrumation as a library, not only through javaagent #12308
Comments
hi @adamw!
I think this is what you want.
check out Line 27 in faff2d9
|
@trask Thanks, I do have that, and I'm calling |
In my case, the proper way to solve my problem (exposing runtime JVM metrics) was to use a dedicated library: However, I still think that having a way of using the JMX metrics bridge without the java agent would be beneficial, so I'm keeping this open. |
cc @PeterF778 |
If I remember correctly, JMX Metric Insight uses two different calls for building the configuration (parser) and for starting the collection to make sure that no attempts to report metrics happen before the agent is fully initialized (metric exporter, etc.). I'll have another look to see if this can be made more user friendly. |
I revisited the code. The |
Is your feature request related to a problem? Please describe.
I'd like to use the Otel <-> JMX integration as a library, without the need to install a Java Agent, as described currently on: https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/instrumentation/jmx-metrics/javaagent/README.md
I don't think the
javaagent
code is published, I've been only able to find thelibrary
on Maven Central:Describe the solution you'd like
My goal is to include all observability-related setup as code, in the
main
method of the application. I've got OTEL working without problems usingAutoConfiguredOpenTelemetrySdk.initialize().getOpenTelemetrySdk()
, but to get the JMX integration I think I'll have to copy the initialisation code fromJmxMetricInsightInstaller.java
for now.Ideally. I'd be able to do sth like
JmxMetrics.initialise(openTelemetry)
, given an instance ofOpenTelemetry
.Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: