Skip to content

Commit

Permalink
Use more suitable latency bucket sizes
Browse files Browse the repository at this point in the history
  • Loading branch information
Dean-Coakley committed Dec 8, 2020
1 parent e3dc777 commit d9f89da
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions internal/metrics/collectors/workqueue.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import (

const workqueueSubsystem = "workqueue"

var workqueueLatencyBucketsSeconds = []float64{0.1, 0.5, 1, 5, 10, 50}

// WorkQueueMetricsCollector collects the metrics about the work queue, which the Ingress Controller uses to process changes to the resources in the cluster.
// implements the prometheus.Collector interface
type WorkQueueMetricsCollector struct {
Expand Down Expand Up @@ -34,7 +36,7 @@ func NewWorkQueueMetricsCollector(constLabels map[string]string) *WorkQueueMetri
Subsystem: workqueueSubsystem,
Name: "queue_duration_seconds",
Help: "How long in seconds an item stays in workqueue before being processed",
Buckets: prometheus.ExponentialBuckets(10e-9, 10, 10),
Buckets: workqueueLatencyBucketsSeconds,
ConstLabels: constLabels,
},
[]string{"name"},
Expand All @@ -45,7 +47,7 @@ func NewWorkQueueMetricsCollector(constLabels map[string]string) *WorkQueueMetri
Subsystem: workqueueSubsystem,
Name: "work_duration_seconds",
Help: "How long in seconds processing an item from workqueue takes",
Buckets: prometheus.ExponentialBuckets(10e-9, 10, 10),
Buckets: workqueueLatencyBucketsSeconds,
ConstLabels: constLabels,
},
[]string{"name"},
Expand Down

0 comments on commit d9f89da

Please sign in to comment.