We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1e44427 commit bc53fa6Copy full SHA for bc53fa6
spectator-ext-gc/src/main/java/com/netflix/spectator/gc/GcLogger.java
@@ -252,7 +252,8 @@ private void processGcEvent(GarbageCollectionNotificationInfo info) {
252
.withTag("action", info.getGcAction())
253
.withTag("cause", info.getGcCause());
254
Timer timer = Spectator.globalRegistry().timer(eventId);
255
- timer.record(info.getGcInfo().getDuration(), TimeUnit.MILLISECONDS);
+ long duration = Math.max(1, info.getGcInfo().getDuration());
256
+ timer.record(duration, TimeUnit.MILLISECONDS);
257
258
// Update promotion and allocation counters
259
updateMetrics(info.getGcName(), info.getGcInfo());
0 commit comments