-
I am trying to implement observability on my application using MicroMeter and OTLP. When I run locally and look at the available metrics I see all kinds of great CPU and memory metrics, but when I compile to native and deploy I don't see any memory metrics at all and I see NAN for the system cpu. Is there a config I need to turn on to get cpu and memory metrics for a GraalVm image? Currently I have
and that renders output like this at /q/metrics
I know graalvm is not really using a JVM so I was expecting some difference when running as a native image, but I was surprised to see no CPU or Memory metrics at all. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
/cc @ebullient, @jmartisk |
Beta Was this translation helpful? Give feedback.
-
Substrate VM does not (to my knowledge) support MemoryPoolMXBeans (oracle/graal#4510) Quarkus avoids loading this binder: Which would no-op itself at bind time because the MemoryPoolMxBeans aren't present): So any metrics emitted by that binder won't be present in native image. Others might not fail, but may not be populated. |
Beta Was this translation helpful? Give feedback.
Substrate VM does not (to my knowledge) support MemoryPoolMXBeans (oracle/graal#4510)
Quarkus avoids loading this binder:
quarkus/extensions/micrometer/runtime/src/main/java/io/quarkus/micrometer/runtime/MicrometerRecorder.java
Line 116 in 314c240
Which would no-op itself at bind time because the MemoryPoolMxBeans aren't present):
https://github.com/micrometer-metrics/micrometer/blob/fd775bf43c15b4e0d25d8eea18112ef1510069c8/micrometer-core/src/main/java/io/micrometer/core/instrument/binder/jvm/JvmGcMetrics.java#L250
So any metrics emitted by that binder won't be present in native image. Others might not fail, but may not be populated.
See …