-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
A favor I ask of the team
This is actually the second time I have opened this issue, the first was #7803 opened on November 11, 2023,
but it was closed maybe because I couldn't explain it clearly, I ask that you please be aware that this issue does not refer to compilation problems and yes, the lack of data in the NotificationEmitter at runtime to collect GC metrics, this occurs in both G1GC and SerialGC in both GraalVM CE and Oracle GraalVM
Describe the problem
I'm developing applications and I'm missing some statistics when using Micrometer, being more specific the details and duration of GC pauses, I started validating the lib code and noticed that the problem is actually that it seems that NotificationEmitter is not working launching the notification events and this only happens in the native image, these metrics are very important for us to be able to put the applications into production, so I would like help to solve this problem.
Steps to reproduce the issue
- git clone --depth 1 https://github.com/viniciusxyz/graalvm-issue-7803-notification-emmiter.git
- Build app
mvn clean package -Pnative
- Run app
./target/main-notification-emitter
When running the native image, only the notifier addition log will be displayed, and when running with hotspot, when System.gc() is called, a log is displayed from the emission of the NotificationEmitter event
Describe GraalVM and its environment:
- GraalVM version: GraalVM CE 21+35.1 (build 21+35-jvmci-23.1-b15)
- JDK major version: 21
- OS: Windows 11
- Architecture: AMD64
More details
Print execution with hotspot:
Print from execution with native compilation:
All compilation configuration is in the pom file of the project passed in the example
To prove that the problem does not depend on whether it is graalvm ce or oracle graalvm, the print follows with the same behavior:
Currently, as far as I know, there are two main ways to expose information about the garbage collector runtimes while the application is running so that we can view it continuously when we are in Kubernetes, the first is through a javaagent that exports this information to any provider such as Prometheus and another is by adding some lib that sends these metrics to one of these providers, but as far as I've seen both forms depend on notificationEmmiter for updates related to these metrics, without this improvement several applications that monitor the GC via Prometheus + micrometer for example will be left without the data for monitoring related to GC times.
Demo of information visualization in grafana
Without native compilation
With native compilation
@wirthi @kassifar I reopened the issue, if any details were not clear please let me know