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

Function MustRegister

prometheus/registry.go:176–178  ·  view source on GitHub ↗

MustRegister registers the provided Collectors with the DefaultRegisterer and panics if any error occurs. MustRegister is a shortcut for DefaultRegisterer.MustRegister(cs...). See there for more details.

(cs ...Collector)

Source from the content-addressed store, hash-verified

174// MustRegister is a shortcut for DefaultRegisterer.MustRegister(cs...). See
175// there for more details.
176func MustRegister(cs ...Collector) {
177 DefaultRegisterer.MustRegister(cs...)
178}
179
180// Unregister removes the registration of the provided Collector from the
181// DefaultRegisterer.

Callers 9

ExampleGaugeFunction · 0.92
ExampleGaugeVecFunction · 0.92
ExampleCounterVecFunction · 0.92
ExampleCollectorFuncFunction · 0.92
initFunction · 0.85

Calls 1

MustRegisterMethod · 0.65

Tested by 8

ExampleGaugeFunction · 0.74
ExampleGaugeVecFunction · 0.74
ExampleCounterVecFunction · 0.74
ExampleCollectorFuncFunction · 0.74