Skip to content

Commit

Permalink
pkg/metrics: add 100/1000s buckets for workqueue histograms
Browse files Browse the repository at this point in the history
Controllers making many external requests in large clusters
may have normal operating latency on the order of ~100s.
Add buckets that cover the range, allowing metric backends
to interpolate percentile estimates properly.

Fixes #2625
  • Loading branch information
seankhliao committed Jan 5, 2024
1 parent 91f642b commit 8175828
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/metrics/workqueue.go
Expand Up @@ -54,14 +54,14 @@ var (
Subsystem: WorkQueueSubsystem,
Name: QueueLatencyKey,
Help: "How long in seconds an item stays in workqueue before being requested",
Buckets: prometheus.ExponentialBuckets(10e-9, 10, 10),
Buckets: prometheus.ExponentialBuckets(10e-9, 10, 12),
}, []string{"name"})

workDuration = prometheus.NewHistogramVec(prometheus.HistogramOpts{
Subsystem: WorkQueueSubsystem,
Name: WorkDurationKey,
Help: "How long in seconds processing an item from workqueue takes.",
Buckets: prometheus.ExponentialBuckets(10e-9, 10, 10),
Buckets: prometheus.ExponentialBuckets(10e-9, 10, 12),
}, []string{"name"})

unfinished = prometheus.NewGaugeVec(prometheus.GaugeOpts{
Expand Down

0 comments on commit 8175828

Please sign in to comment.