Skip to content

Commit

Permalink
Merge pull request #646 from Channyboy/micrometer-mpm51-fix-gcTime
Browse files Browse the repository at this point in the history
Fix gc.time as it should be a gauge
  • Loading branch information
Channyboy authored Oct 8, 2023
2 parents 866f84b + a17a51f commit d29db20
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ private void garbageCollectionMetrics(MetricRegistry registry) {
+ "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.")
.withUnit(MetricUnits.SECONDS).build();
lmr.counter(metadata, gc, gcObj -> (gcObj.getCollectionTime() / 1e+3), new Tag[] { tag });

lmr.gauge(metadata, gc, gcObj -> (gcObj.getCollectionTime() / 1e+3), new Tag[] { tag });

}
}
Expand Down

0 comments on commit d29db20

Please sign in to comment.