MCPcopy Create free account
hub / github.com/cortexproject/cortex / registerCollector

Function registerCollector

pkg/util/validation/validate.go:99–104  ·  view source on GitHub ↗
(r prometheus.Registerer, c prometheus.Collector)

Source from the content-addressed store, hash-verified

97}
98
99func registerCollector(r prometheus.Registerer, c prometheus.Collector) {
100 err := r.Register(c)
101 if err != nil && !errors.As(err, &prometheus.AlreadyRegisteredError{}) {
102 panic(err)
103 }
104}
105
106func NewValidateMetrics(r prometheus.Registerer) *ValidateMetrics {
107 discardedSamples := prometheus.NewCounterVec(

Callers 1

NewValidateMetricsFunction · 0.85

Calls 1

RegisterMethod · 0.80

Tested by

no test coverage detected