Skip to content
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

Do not register GC metrics when GC notifications are unavailable #5149

Merged
merged 1 commit into from
Jun 19, 2024

Conversation

codesimplicity
Copy link
Contributor

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 GarbageCollectorMXBean exposed but those don't support any notification types
  • G1 GC (Enterprise Edition only): no GarbageCollectorMXBean exposed

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.

@shakuzen shakuzen added theme: native-image Issues related to GraalVM native or Project Leyden enhancement A general enhancement module: micrometer-core An issue that is related to our core module labels Jun 18, 2024
@shakuzen shakuzen added this to the 1.14.0-M1 milestone Jun 18, 2024
@shakuzen shakuzen self-assigned this Jun 18, 2024
Copy link
Member

@shakuzen shakuzen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the pull request and linking to the issue in GraalVM. I've subscribed to notifications (pun intended) on it. When it is resolved, we could consider adding some native image tests for GC metrics.

@shakuzen shakuzen changed the title Check if any GC notifications available Do not register GC metrics when GC notifications are unavailable Jun 19, 2024
@shakuzen shakuzen merged commit 51b9b4f into micrometer-metrics:main Jun 19, 2024
6 checks passed
@codesimplicity codesimplicity deleted the graalvm-gc branch June 23, 2024 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement A general enhancement module: micrometer-core An issue that is related to our core module theme: native-image Issues related to GraalVM native or Project Leyden
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants