Description
Describe the Issue
For a springboot 3.4 ( latest as of this writing) and GraalVM JDK23, project, there are missing metrics.
For background, the same app https://github.com/patpatpat123/nativejvmmetricsissueminimal running in "normal" (not native) will have the jvm_gc_* and jvm_buffer_* metrics
The exact same app, running as native image, will not have the metrics, which is the issue.
Not having GC, buffer etc metrics greatly impact the observability of the native image app.
Thank you for looking into this.
Using the latest version of GraalVM can resolve many issues.
- I tried with the latest version of GraalVM.
GraalVM Version
java 23 2024-09-17
Java(TM) SE Runtime Environment Oracle GraalVM 23+37.1 (build 23+37-jvmci-b01)
Java HotSpot(TM) 64-Bit Server VM Oracle GraalVM 23+37.1 (build 23+37-jvmci-b01, mixed mode, sharing)
Operating System and Version
Mac os
Diagnostic Flag Confirmation
- I tried the
-H:ThrowMissingRegistrationErrors=
flag.
Run Command
mvn -Pnative spring-boot:build-image
docker run docker.io/library/sre-demo:0.0.1-SNAPSHOT
Expected Behavior
to see jvm_gc_* and jvm_buffer_* in both non native and native image
Actual Behavior
jvm_gc_* and jvm_buffer_* are present only in non native run, but absent when running native image.
Steps to Reproduce
mvn -Pnative spring-boot:build-image
docker run docker.io/library/sre-demo:0.0.1-SNAPSHOT
Additional Context
https://github.com/patpatpat123/nativejvmmetricsissueminimal
Run-Time Log Output and Error Messages
No response