Skip to content

Commit

Permalink
Update garbage collector instruments to be async counters (#4600)
Browse files Browse the repository at this point in the history
  • Loading branch information
jack-berg authored Nov 5, 2021
1 parent 958f1c0 commit 2f47e8a
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ public static void registerObservers() {
labelSets.add(Attributes.of(GC_KEY, gc.getName()));
}
meter
.gaugeBuilder("runtime.jvm.gc.time")
.ofLongs()
.counterBuilder("runtime.jvm.gc.time")
.setDescription("Time spent in a given JVM garbage collector in milliseconds.")
.setUnit("ms")
.buildWithCallback(
Expand All @@ -54,8 +53,7 @@ public static void registerObservers() {
}
});
meter
.gaugeBuilder("runtime.jvm.gc.count")
.ofLongs()
.counterBuilder("runtime.jvm.gc.count")
.setDescription(
"The number of collections that have occurred for a given JVM garbage collector.")
.setUnit("collections")
Expand Down

0 comments on commit 2f47e8a

Please sign in to comment.