mirror of
https://github.com/prometheus/prometheus
synced 2024-12-27 17:13:22 +00:00
Merge pull request #5860 from tariq1890/variadic
pass multiple args to Registerer.MustRegister method
This commit is contained in:
commit
70ce3df23c
@ -177,8 +177,10 @@ type clientGoRequestMetricAdapter struct{}
|
||||
|
||||
func (f *clientGoRequestMetricAdapter) Register(registerer prometheus.Registerer) {
|
||||
metrics.Register(f, f)
|
||||
registerer.MustRegister(clientGoRequestResultMetricVec)
|
||||
registerer.MustRegister(clientGoRequestLatencyMetricVec)
|
||||
registerer.MustRegister(
|
||||
clientGoRequestResultMetricVec,
|
||||
clientGoRequestLatencyMetricVec,
|
||||
)
|
||||
}
|
||||
func (clientGoRequestMetricAdapter) Increment(code string, method string, host string) {
|
||||
clientGoRequestResultMetricVec.WithLabelValues(code).Inc()
|
||||
@ -192,15 +194,16 @@ type clientGoCacheMetricsProvider struct{}
|
||||
|
||||
func (f *clientGoCacheMetricsProvider) Register(registerer prometheus.Registerer) {
|
||||
cache.SetReflectorMetricsProvider(f)
|
||||
registerer.MustRegister(clientGoCacheWatchesDurationMetric)
|
||||
registerer.MustRegister(clientGoCacheWatchesCountMetric)
|
||||
registerer.MustRegister(clientGoCacheListDurationMetric)
|
||||
registerer.MustRegister(clientGoCacheListTotalMetric)
|
||||
registerer.MustRegister(clientGoCacheLastResourceVersionMetric)
|
||||
registerer.MustRegister(clientGoCacheShortWatchesCountMetric)
|
||||
registerer.MustRegister(clientGoCacheItemsInWatchesCountMetric)
|
||||
registerer.MustRegister(clientGoCacheItemsInListCountMetric)
|
||||
|
||||
registerer.MustRegister(
|
||||
clientGoCacheWatchesDurationMetric,
|
||||
clientGoCacheWatchesCountMetric,
|
||||
clientGoCacheListDurationMetric,
|
||||
clientGoCacheListTotalMetric,
|
||||
clientGoCacheLastResourceVersionMetric,
|
||||
clientGoCacheShortWatchesCountMetric,
|
||||
clientGoCacheItemsInWatchesCountMetric,
|
||||
clientGoCacheItemsInListCountMetric,
|
||||
)
|
||||
}
|
||||
func (clientGoCacheMetricsProvider) NewListsMetric(name string) cache.CounterMetric {
|
||||
return clientGoCacheListTotalMetric
|
||||
@ -232,12 +235,14 @@ type clientGoWorkqueueMetricsProvider struct{}
|
||||
|
||||
func (f *clientGoWorkqueueMetricsProvider) Register(registerer prometheus.Registerer) {
|
||||
workqueue.SetProvider(f)
|
||||
registerer.MustRegister(clientGoWorkqueueDepthMetricVec)
|
||||
registerer.MustRegister(clientGoWorkqueueAddsMetricVec)
|
||||
registerer.MustRegister(clientGoWorkqueueLatencyMetricVec)
|
||||
registerer.MustRegister(clientGoWorkqueueWorkDurationMetricVec)
|
||||
registerer.MustRegister(clientGoWorkqueueUnfinishedWorkSecondsMetricVec)
|
||||
registerer.MustRegister(clientGoWorkqueueLongestRunningProcessorMetricVec)
|
||||
registerer.MustRegister(
|
||||
clientGoWorkqueueDepthMetricVec,
|
||||
clientGoWorkqueueAddsMetricVec,
|
||||
clientGoWorkqueueLatencyMetricVec,
|
||||
clientGoWorkqueueWorkDurationMetricVec,
|
||||
clientGoWorkqueueUnfinishedWorkSecondsMetricVec,
|
||||
clientGoWorkqueueLongestRunningProcessorMetricVec,
|
||||
)
|
||||
}
|
||||
|
||||
func (f *clientGoWorkqueueMetricsProvider) NewDepthMetric(name string) workqueue.GaugeMetric {
|
||||
|
Loading…
Reference in New Issue
Block a user