Skip to content

Commit

Permalink
Use the instance registry instead of the prometheus.registry
Browse files Browse the repository at this point in the history
  • Loading branch information
mattdurham committed Nov 17, 2021
1 parent fae515f commit b383b6f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/registry/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ func (r *Registry) GetHistogram(metricName string, labels prometheus.Labels, hel
Buckets: buckets,
}, labelNames)

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

if err := prometheus.Register(uncheckedCollector{summaryVec}); err != nil {
if err := r.Registerer.Register(uncheckedCollector{summaryVec}); err != nil {
return nil, err
}
} else {
Expand Down

0 comments on commit b383b6f

Please sign in to comment.