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

Function Register

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

Register registers the provided Collector with the DefaultRegisterer. Register is a shortcut for DefaultRegisterer.Register(c). See there for more details.

(c Collector)

Source from the content-addressed store, hash-verified

165// Register is a shortcut for DefaultRegisterer.Register(c). See there for more
166// details.
167func Register(c Collector) error {
168 return DefaultRegisterer.Register(c)
169}
170
171// MustRegister registers the provided Collectors with the DefaultRegisterer and
172// panics if any error occurs.

Callers 4

ExampleGaugeFunc_simpleFunction · 0.92
ExampleRegisterFunction · 0.92

Calls 1

RegisterMethod · 0.65

Tested by 4

ExampleGaugeFunc_simpleFunction · 0.74
ExampleRegisterFunction · 0.74