MCPcopy
hub / github.com/prometheus/client_golang / NewCounterVec

Function NewCounterVec

prometheus/promauto/auto.go:175–177  ·  view source on GitHub ↗

NewCounterVec works like the function of the same name in the prometheus package but it automatically registers the CounterVec with the prometheus.DefaultRegisterer. If the registration fails, NewCounterVec panics.

(opts prometheus.CounterOpts, labelNames []string)

Source from the content-addressed store, hash-verified

173// prometheus.DefaultRegisterer. If the registration fails, NewCounterVec
174// panics.
175func NewCounterVec(opts prometheus.CounterOpts, labelNames []string) *prometheus.CounterVec {
176 return With(prometheus.DefaultRegisterer).NewCounterVec(opts, labelNames)
177}
178
179// NewCounterFunc works like the function of the same name in the prometheus
180// package but it automatically registers the CounterFunc with the

Callers

nothing calls this directly

Calls 2

WithFunction · 0.85
NewCounterVecMethod · 0.45

Tested by

no test coverage detected