Skip to content

Commit

Permalink
fix(polling): Correctly reset failed items gauge on success (#233)
Browse files Browse the repository at this point in the history
  • Loading branch information
robzienert committed Mar 16, 2018
1 parent 8a7c9e3 commit 60d3bfc
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ deltaSize, upperThreshold, kv("monitor", monitorName), kv("partition", ctx.parti

commitDelta(delta, ctx.fastForward);
registry.gauge(itemsCachedId.withTags("monitor", monitorName, "partition", ctx.partitionName)).set(deltaSize);
registry.gauge(itemsOverThresholdId.withTags("monitor", monitorName, "partition", ctx.partitionName)).set(deltaSize);
registry.gauge(itemsOverThresholdId.withTags("monitor", monitorName, "partition", ctx.partitionName)).set(0);
} catch (Exception e) {
log.error("Failed to update monitor items for {}:{}", kv("monitor", monitorName), kv("partition", ctx.partitionName), e);
registry.counter(pollCycleFailedId.withTags("monitor", monitorName, "partition", ctx.partitionName)).increment();
Expand Down

0 comments on commit 60d3bfc

Please sign in to comment.