Skip to content

Commit 679bb11

Browse files
committed
pkg/metrics/workqueue.go: remove deprecated metrics
Deprecated metrics from upstream k8s.io/client-go/util/workqueue were removed prior to 1.15, so they can now be safely removed from controller-runtime. See: kubernetes/client-go@ee078c7
1 parent ad57a97 commit 679bb11

File tree

1 file changed

+0
-49
lines changed

1 file changed

+0
-49
lines changed

pkg/metrics/workqueue.go

Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -122,52 +122,3 @@ func (workqueueMetricsProvider) NewRetriesMetric(queue string) workqueue.Counter
122122
registerWorkqueueMetric(m, name, queue)
123123
return m
124124
}
125-
126-
// TODO(abursavich): Remove the following deprecated metrics when they are
127-
// removed from k8s.io/client-go/util/workqueue.
128-
129-
func (workqueueMetricsProvider) NewDeprecatedLongestRunningProcessorMicrosecondsMetric(queue string) workqueue.SettableGaugeMetric {
130-
const name = "workqueue_longest_running_processor_microseconds"
131-
m := prometheus.NewGauge(prometheus.GaugeOpts{
132-
Name: name,
133-
Help: "(Deprecated) How many microseconds has the longest running " +
134-
"processor for workqueue been running.",
135-
ConstLabels: prometheus.Labels{"name": queue},
136-
})
137-
registerWorkqueueMetric(m, name, queue)
138-
return m
139-
}
140-
141-
// NOTE: The following deprecated metrics are noops because they were never
142-
// included in controller-runtime.
143-
144-
func (workqueueMetricsProvider) NewDeprecatedDepthMetric(queue string) workqueue.GaugeMetric {
145-
return noopMetric{}
146-
}
147-
148-
func (workqueueMetricsProvider) NewDeprecatedAddsMetric(queue string) workqueue.CounterMetric {
149-
return noopMetric{}
150-
}
151-
152-
func (workqueueMetricsProvider) NewDeprecatedLatencyMetric(queue string) workqueue.SummaryMetric {
153-
return noopMetric{}
154-
}
155-
156-
func (workqueueMetricsProvider) NewDeprecatedWorkDurationMetric(queue string) workqueue.SummaryMetric {
157-
return noopMetric{}
158-
}
159-
160-
func (workqueueMetricsProvider) NewDeprecatedUnfinishedWorkSecondsMetric(queue string) workqueue.SettableGaugeMetric {
161-
return noopMetric{}
162-
}
163-
164-
func (workqueueMetricsProvider) NewDeprecatedRetriesMetric(queue string) workqueue.CounterMetric {
165-
return noopMetric{}
166-
}
167-
168-
type noopMetric struct{}
169-
170-
func (noopMetric) Inc() {}
171-
func (noopMetric) Dec() {}
172-
func (noopMetric) Set(float64) {}
173-
func (noopMetric) Observe(float64) {}

0 commit comments

Comments
 (0)