Use the instance registry instead of the prometheus.registry

Signed-off-by: Matt Durham <mattdurham@ppog.org>
This commit is contained in:
Matt Durham 2021-11-17 11:35:20 -05:00
parent fae515f739
commit aadb43ed02

View file

@ -259,7 +259,7 @@ func (r *Registry) GetHistogram(metricName string, labels prometheus.Labels, hel
Buckets: buckets, Buckets: buckets,
}, labelNames) }, labelNames)
if err := prometheus.Register(uncheckedCollector{histogramVec}); err != nil { if err := r.Registerer.Register(uncheckedCollector{histogramVec}); err != nil {
return nil, err return nil, err
} }
} else { } else {
@ -328,7 +328,7 @@ func (r *Registry) GetSummary(metricName string, labels prometheus.Labels, help
BufCap: summaryOptions.BufCap, BufCap: summaryOptions.BufCap,
}, labelNames) }, labelNames)
if err := prometheus.Register(uncheckedCollector{summaryVec}); err != nil { if err := r.Registerer.Register(uncheckedCollector{summaryVec}); err != nil {
return nil, err return nil, err
} }
} else { } else {