Skip to content

Most OpenTelemetry automatic instrumentation metrics don't work on native #48365

@brunobat

Description

@brunobat

Describe the bug

We use external libraries from OTel to create these metrics and it turns out most of them don't work with native mode.

This this will require a lot of work to fix and should be made in the scope of a new issue.
Most likely we will need to either contribute fixes to upstream or instrument ourselves.

This the current compatibility matrix:

Metric Name Description Type Available on JVM? Available on Native? MP 2.0?
http.server.request.duration Duration of HTTP server requests HISTOGRAM Y Y Y
jvm.memory.committed Measure of memory committed LONG_SUM Y No data produced Y
jvm.memory.used Measure of memory used LONG_SUM Y No data produced Y
jvm.memory.limit Measure of max obtainable memory LONG_SUM Y Not present Y
jvm.memory.used_after_last_gc Measure of memory used, as measured after the most recent garbage collection event on this pool. LONG_SUM Y No data produced Y
jvm.gc.duration Duration of JVM garbage collection actions HISTOGRAM Y Not present Y
jvm.class.count Number of classes currently loaded. LONG_SUM Y No data produced Y
jvm.class.loaded Number of classes loaded since JVM start. LONG_SUM Y No data produced Y
jvm.class.unloaded Number of classes unloaded since JVM start. LONG_SUM Y No data produced Y
jvm.cpu.count Number of processors available to the Java virtual machine. LONG_SUM Y Y N
jvm.cpu.limit LONG_SUM Y No data produced N
jvm.cpu.time CPU time used by the process as reported by the JVM. DOUBLE_SUM Y Not present N
jvm.system.cpu.utilization CPU time used by the process as reported by the JVM. DOUBLE_SUM Not present No data produced N
jvm.cpu.recent_utilization Recent CPU utilization for the process as reported by the JVM. DOUBLE_GAUGE Y No data produced N
jvm.cpu.longlock Long lock times HISTOGRAM Y Y N
jvm.cpu.context_switch DOUBLE_SUM Y No data produced N
jvm.network.io Network read/write bytes. HISTOGRAM Y Not present N
jvm.network.time Network read/write duration. HISTOGRAM Y Not present N
jvm.thread.count Number of executing platform threads. LONG_SUM Y Y Y

Expected behavior

Most metrics, especially the MP 2.0 related ones, should be available on native mode.

Actual behavior

See table in the description.

How to Reproduce?

No response

Output of uname -a or ver

No response

Output of java -version

No response

Quarkus version or git rev

No response

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions