@@ -18,6 +18,7 @@ package metrics
18
18
19
19
import (
20
20
"strconv"
21
+ "time"
21
22
22
23
"github.com/prometheus/client_golang/prometheus"
23
24
"k8s.io/client-go/util/workqueue"
@@ -54,17 +55,23 @@ var (
54
55
}, []string {"name" , "controller" })
55
56
56
57
latency = prometheus .NewHistogramVec (prometheus.HistogramOpts {
57
- Subsystem : WorkQueueSubsystem ,
58
- Name : QueueLatencyKey ,
59
- Help : "How long in seconds an item stays in workqueue before being requested" ,
60
- Buckets : prometheus .ExponentialBuckets (10e-9 , 10 , 12 ),
58
+ Subsystem : WorkQueueSubsystem ,
59
+ Name : QueueLatencyKey ,
60
+ Help : "How long in seconds an item stays in workqueue before being requested" ,
61
+ Buckets : prometheus .ExponentialBuckets (10e-9 , 10 , 12 ),
62
+ NativeHistogramBucketFactor : 1.1 ,
63
+ NativeHistogramMaxBucketNumber : 100 ,
64
+ NativeHistogramMinResetDuration : 1 * time .Hour ,
61
65
}, []string {"name" , "controller" })
62
66
63
67
workDuration = prometheus .NewHistogramVec (prometheus.HistogramOpts {
64
- Subsystem : WorkQueueSubsystem ,
65
- Name : WorkDurationKey ,
66
- Help : "How long in seconds processing an item from workqueue takes." ,
67
- Buckets : prometheus .ExponentialBuckets (10e-9 , 10 , 12 ),
68
+ Subsystem : WorkQueueSubsystem ,
69
+ Name : WorkDurationKey ,
70
+ Help : "How long in seconds processing an item from workqueue takes." ,
71
+ Buckets : prometheus .ExponentialBuckets (10e-9 , 10 , 12 ),
72
+ NativeHistogramBucketFactor : 1.1 ,
73
+ NativeHistogramMaxBucketNumber : 100 ,
74
+ NativeHistogramMinResetDuration : 1 * time .Hour ,
68
75
}, []string {"name" , "controller" })
69
76
70
77
unfinished = prometheus .NewGaugeVec (prometheus.GaugeOpts {
0 commit comments