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

Function NewHistogram

prometheus/promauto/auto.go:226–228  ·  view source on GitHub ↗

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

(opts prometheus.HistogramOpts)

Source from the content-addressed store, hash-verified

224// package but it automatically registers the Histogram with the
225// prometheus.DefaultRegisterer. If the registration fails, NewHistogram panics.
226func NewHistogram(opts prometheus.HistogramOpts) prometheus.Histogram {
227 return With(prometheus.DefaultRegisterer).NewHistogram(opts)
228}
229
230// NewHistogramVec works like the function of the same name in the prometheus
231// package but it automatically registers the HistogramVec with the

Callers

nothing calls this directly

Calls 2

WithFunction · 0.85
NewHistogramMethod · 0.80

Tested by

no test coverage detected