Skip to content

Commit

Permalink
Include a zero bucket, zeros are being reported as 1 (#6153)
Browse files Browse the repository at this point in the history
With a min bucket of `1`, a `0` is reported as a `1`, which is quite misleading for this kind of use.

Sorta obvious in retrospect, but we have so few histograms anywhere that I apparently don't have any safe habits built up.
  • Loading branch information
Groxx authored Jul 2, 2024
1 parent ca824a0 commit 6e8d0f3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions common/metrics/defs.go
Original file line number Diff line number Diff line change
Expand Up @@ -3327,6 +3327,7 @@ var PersistenceLatencyBuckets = tally.DurationBuckets([]time.Duration{
// GlobalRatelimiterUsageHistogram contains buckets for tracking how many ratelimiters are
// in which state (startup, healthy, failing).
var GlobalRatelimiterUsageHistogram = tally.ValueBuckets{
0, // need an explicit 0 to record zeros
1, 2, 5, 10,
25, 50, 100,
250, 500, 1000,
Expand Down

0 comments on commit 6e8d0f3

Please sign in to comment.