How to enable OpenTelemetry metric in payara 6

Hi,

I found documentation how to setup OpenTelemetry for payara. There is information where documentation says deployment of an OpenTelemetry Agent is not necessary and may lead to duplicate traces.

I enable request tracing and setup -Dotel.sdk.disabled=false. I use OTPL exporter where data are sent to elastic apm server. I cannot see any metric about my jvm in kibana

when I added this option to my domain.xml -javaagent:${com.sun.aas.installRoot}/lib/opentelemetry-javaagent-2.11.0.jar
I see metric about jvm in Kibana.

I cannot disable payara open telemetry agent because data are sent regardless of request tracing enabled property : false/true which leads to duplicate traces and spans.

Please could you share some information how to setup open telemetry metric for jvm only with payara Open Telemetry agent?

thanks

I have this system properties in my domain.xml, but I can not see any metrics.

    <jvm-options>-Dotel.exporter.otlp.endpoint=http://localhost:8200</jvm-options>
    <jvm-options>-Dotel.service.name=xxx</jvm-options>
    <jvm-options>-Dotel.sdk.disabled=false</jvm-options>
    <jvm-options>-Dotel.metrics.exporter=otlp</jvm-options>
    <jvm-options>-Dotel.metrics.enabled=true</jvm-options>

I found in payara code via github how open telemetry is configured via startup. This is a reason why I added explicitly otel.metrics.exporter=otlp, but it doesn’t work.

If I added open telemetry agent explicitly, I see jvm metric in kibana without any configuration.

Thanks for help.

Hi Ciment, thank you for your post.

The functionality you’re describing falls within our Payara Enterprise capabilities rather than what’s available in the Community Edition.

While Payara Community offers a wide range of features, some advanced capabilities are designed for our Enterprise customers who require additional support for mission-critical deployments.

The Community Edition remains powerful for many use cases, but if you need this specific functionality, you might want to explore our Enterprise offering .

If you have any other questions about what’s possible within the Community edition limits, please let us know, you can email us at info@payara.fish or feel free to message me directly via LinkedIn.

Dominika at the Payara Community Team