@@ -42,27 +42,27 @@ var (
42
42
Subsystem : WorkQueueSubsystem ,
43
43
Name : DepthKey ,
44
44
Help : "Current depth of workqueue" ,
45
- }, []string {"name" })
45
+ }, []string {"name" , "controller" })
46
46
47
47
adds = prometheus .NewCounterVec (prometheus.CounterOpts {
48
48
Subsystem : WorkQueueSubsystem ,
49
49
Name : AddsKey ,
50
50
Help : "Total number of adds handled by workqueue" ,
51
- }, []string {"name" })
51
+ }, []string {"name" , "controller" })
52
52
53
53
latency = prometheus .NewHistogramVec (prometheus.HistogramOpts {
54
54
Subsystem : WorkQueueSubsystem ,
55
55
Name : QueueLatencyKey ,
56
56
Help : "How long in seconds an item stays in workqueue before being requested" ,
57
57
Buckets : prometheus .ExponentialBuckets (10e-9 , 10 , 12 ),
58
- }, []string {"name" })
58
+ }, []string {"name" , "controller" })
59
59
60
60
workDuration = prometheus .NewHistogramVec (prometheus.HistogramOpts {
61
61
Subsystem : WorkQueueSubsystem ,
62
62
Name : WorkDurationKey ,
63
63
Help : "How long in seconds processing an item from workqueue takes." ,
64
64
Buckets : prometheus .ExponentialBuckets (10e-9 , 10 , 12 ),
65
- }, []string {"name" })
65
+ }, []string {"name" , "controller" })
66
66
67
67
unfinished = prometheus .NewGaugeVec (prometheus.GaugeOpts {
68
68
Subsystem : WorkQueueSubsystem ,
@@ -71,20 +71,20 @@ var (
71
71
"is in progress and hasn't been observed by work_duration. Large " +
72
72
"values indicate stuck threads. One can deduce the number of stuck " +
73
73
"threads by observing the rate at which this increases." ,
74
- }, []string {"name" })
74
+ }, []string {"name" , "controller" })
75
75
76
76
longestRunningProcessor = prometheus .NewGaugeVec (prometheus.GaugeOpts {
77
77
Subsystem : WorkQueueSubsystem ,
78
78
Name : LongestRunningProcessorKey ,
79
79
Help : "How many seconds has the longest running " +
80
80
"processor for workqueue been running." ,
81
- }, []string {"name" })
81
+ }, []string {"name" , "controller" })
82
82
83
83
retries = prometheus .NewCounterVec (prometheus.CounterOpts {
84
84
Subsystem : WorkQueueSubsystem ,
85
85
Name : RetriesKey ,
86
86
Help : "Total number of retries handled by workqueue" ,
87
- }, []string {"name" })
87
+ }, []string {"name" , "controller" })
88
88
)
89
89
90
90
func init () {
@@ -102,29 +102,29 @@ func init() {
102
102
type workqueueMetricsProvider struct {}
103
103
104
104
func (workqueueMetricsProvider ) NewDepthMetric (name string ) workqueue.GaugeMetric {
105
- return depth .WithLabelValues (name )
105
+ return depth .WithLabelValues (name , name )
106
106
}
107
107
108
108
func (workqueueMetricsProvider ) NewAddsMetric (name string ) workqueue.CounterMetric {
109
- return adds .WithLabelValues (name )
109
+ return adds .WithLabelValues (name , name )
110
110
}
111
111
112
112
func (workqueueMetricsProvider ) NewLatencyMetric (name string ) workqueue.HistogramMetric {
113
- return latency .WithLabelValues (name )
113
+ return latency .WithLabelValues (name , name )
114
114
}
115
115
116
116
func (workqueueMetricsProvider ) NewWorkDurationMetric (name string ) workqueue.HistogramMetric {
117
- return workDuration .WithLabelValues (name )
117
+ return workDuration .WithLabelValues (name , name )
118
118
}
119
119
120
120
func (workqueueMetricsProvider ) NewUnfinishedWorkSecondsMetric (name string ) workqueue.SettableGaugeMetric {
121
- return unfinished .WithLabelValues (name )
121
+ return unfinished .WithLabelValues (name , name )
122
122
}
123
123
124
124
func (workqueueMetricsProvider ) NewLongestRunningProcessorSecondsMetric (name string ) workqueue.SettableGaugeMetric {
125
- return longestRunningProcessor .WithLabelValues (name )
125
+ return longestRunningProcessor .WithLabelValues (name , name )
126
126
}
127
127
128
128
func (workqueueMetricsProvider ) NewRetriesMetric (name string ) workqueue.CounterMetric {
129
- return retries .WithLabelValues (name )
129
+ return retries .WithLabelValues (name , name )
130
130
}
0 commit comments