-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Native Image] jvm_gc_* and jvm_buffer_* metrics missing #9912
Comments
reading jvm events with native image is not a straightforward process and requires some tweaking, there are a few example using OpenTelemetry with GraalVM native image that you can find online, also it would make sense to check with Spring Boot on what they support and with which GraalVM version |
@patpatpat123 Wouldn't JFR be an option for you? |
@patpatpat123 I'm not sure if this will work for you use-case, but I think micrometer uses GC Notifications for gc related metrics. There's a PR up for adding notification support, which might solve your problem: #9799 Otherwise, like Karm said, I think JFR could help you too. |
Hello @oubidar-Abderrahim , Your comment is not very clear, and it seems you are trying to offload a graalvm issue to other teams. After some investigation, it seems this issue is indeed related to graalvm #8237 Furthermore, I do not think this issue should be closed, as #8237 only addresses part of the issue. Would you like me to open an issue reflecting this as well? |
Hmm I don't think it's necessary to open another separate issue. Maybe just mention briefly in the description that #8237 already covers the GC metrics, but you're still concerned about the buffer metrics. |
Hi @oubidar-Abderrahim, I see that you've assigned me to this issue. I probably won't end up working on this for a while and don't want to give the impression that this is actively being worked on, in case someone else wants to give it a shot. However, if no one at Oracle plans on taking this issue, feel free to keep me assigned in the meantime. |
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.
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
-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
The text was updated successfully, but these errors were encountered: