Do not register GC metrics when GC notifications are unavailable by codesimplicity · Pull Request #5149 · micrometer-metrics/micrometer (original) (raw)
This addresses the issue that GraalVM currently does not support GC notifications which means no useful GC metrics with Micrometer. Micrometer does not provide any hint and even registers a few useless metrics which only have initial values but never get updates as this relies on GC notifications.
Current GraalVM GCs show the following behaviour:
- Serial GC (default): two
GarbageCollectorMXBeanexposed but those don't support any notification types - G1 GC (Enterprise Edition only): no
GarbageCollectorMXBeanexposed
Verified that the GCs actually work by enabling GC logging via -XX:+PrintGC - just to be sure.
See the GraalVM issue for this missing feature for reference.