8000 Use more suitable latency bucket sizes · nginx/kubernetes-ingress@46a9877 · GitHub
[go: up one dir, main page]

Skip to content

Commit 46a9877

Browse files
committed
Use more suitable latency bucket sizes
1 parent ed5a613 commit 46a9877

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

internal/metrics/collectors/workqueue.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ import (
77

88
const workqueueSubsystem = "workqueue"
99

10+
var workqueueLatencyBucketsSeconds = []float64{0.1, 0.5, 1, 5, 10, 50}
11+
1012
// WorkQueueMetricsCollector collects the metrics about the work queue, which the Ingress Controller uses to process changes to the resources in the cluster.
1113
// implements the prometheus.Collector interface
1214
type WorkQueueMetricsCollector struct {
@@ -34,7 +36,7 @@ func NewWorkQueueMetricsCollector(constLabels map[string]string) *WorkQueueMetri
3436
Subsystem: workqueueSubsystem,
3537
Name: "queue_duration_seconds",
3638
Help: "How long in seconds an item stays in workqueue before being processed",
37-
Buckets: prometheus.ExponentialBuckets(10e-9, 10, 10),
39+
Buckets: workqueueLatencyBucketsSeconds,
3840
ConstLabels: constLabels,
3941
},
4042
[]string{"name"},
@@ -45,7 +47,7 @@ func NewWorkQueueMetricsCollector(constLabels map[string]string) *WorkQueueMetri
4547
Subsystem: workqueueSubsystem,
4648
Name: "work_duration_seconds",
4749
Help: "How long in seconds processing an item from workqueue takes",
48-
Buckets: prometheus.ExponentialBuckets(10e-9, 10, 10),
50+
Buckets: workqueueLatencyBucketsSeconds,
4951
ConstLabels: constLabels,
5052
},
5153
[]string{"name"},

0 commit comments

Comments
 (0)
0