Skip to content

Enable using JMX Metrics instrumation as a library, not only through javaagent #12308

Closed as not planned
@adamw

Description

@adamw

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 the library on Maven Central:

<dependency>
    <groupId>io.opentelemetry.instrumentation</groupId>
    <artifactId>opentelemetry-jmx-metrics</artifactId>
    <version>2.8.0-alpha</version>
    <scope>runtime</scope>
</dependency>

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 using AutoConfiguredOpenTelemetrySdk.initialize().getOpenTelemetrySdk(), but to get the JMX integration I think I'll have to copy the initialisation code from JmxMetricInsightInstaller.java for now.

Ideally. I'd be able to do sth like JmxMetrics.initialise(openTelemetry), given an instance of OpenTelemetry.

Describe alternatives you've considered

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions