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

GCTime is registered as a Counter, instead of Gauge #640

Closed
pgunapal opened this issue Aug 29, 2023 · 0 comments
Closed

GCTime is registered as a Counter, instead of Gauge #640

pgunapal opened this issue Aug 29, 2023 · 0 comments
Assignees
Milestone

Comments

@pgunapal
Copy link

In the Micrometer Base Metrics implementation, the Garbage Collection Time is being registered as a Counter Metric Type, instead of a Gauge.
https://github.com/smallrye/smallrye-metrics/blob/5dedbc257fefe4d7b5b275f91c217b5de9e08717/implementation/src/main/java/io/smallrye/metrics/base/LegacyBaseMetrics.java#L86C29-L86C29

In the MicroProfile Metrics Specification, it is listed that the GCTime metric type should be Gauge.
https://download.eclipse.org/microprofile/microprofile-metrics-5.0.1/microprofile-metrics-spec-5.0.1.html#_general_jvm_stats

GCTime - Approximate accumulated collection elapsed time in ms

Name gc.time
Type Gauge
Unit Seconds
Multi true
Tags {name=%s}
Description Displays the approximate accumulated collection elapsed time in seconds. This attribute displays -1 if the collection elapsed time is undefined for this collector. The Java virtual machine implementation may use a high resolution timer to measure the elapsed time. This attribute may display the same value even if the collection count has been incremented if the collection elapsed time is very short.
MBean java.lang:type=GarbageCollector,name=%s/CollectionTime
Notes There can be multiple garbage collectors active that are assigned to different memory pools. The %s should be substituted with the name of the garbage collector. The MicroProfile Metrics runtime will need to convert the metric’s value to seconds if the value is provided in a different unit.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants