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

Method MustRegister

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

MustRegister works like Register but registers any number of Collectors and panics upon the first registration that causes an error.

(...Collector)

Source from the content-addressed store, hash-verified

117 // Collectors and panics upon the first registration that causes an
118 // error.
119 MustRegister(...Collector)
120 // Unregister unregisters the Collector that equals the Collector passed
121 // in as an argument. (Two Collectors are considered equal if their
122 // Describe method yields the same set of descriptors.) The function

Callers 15

NewClusterManagerFunction · 0.65
ExampleCollectorFunction · 0.65
testHandlerFunction · 0.65
MustRegisterFunction · 0.65
checkLabelsFunction · 0.65
TestGoCollectorAllowListFunction · 0.65
TestGoCollectorDenyListFunction · 0.65
ExampleNewGoCollectorFunction · 0.65

Implementers 2

wrappingRegistererprometheus/wrap.go
Registryprometheus/registry.go

Calls

no outgoing calls

Tested by 10

NewClusterManagerFunction · 0.52
ExampleCollectorFunction · 0.52
testHandlerFunction · 0.52
TestGoCollectorAllowListFunction · 0.52
TestGoCollectorDenyListFunction · 0.52
ExampleNewGoCollectorFunction · 0.52