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

Function NewRegistry

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

NewRegistry creates a new vanilla Registry without any Collectors pre-registered.

()

Source from the content-addressed store, hash-verified

65// NewRegistry creates a new vanilla Registry without any Collectors
66// pre-registered.
67func NewRegistry() *Registry {
68 return &Registry{
69 collectorsByID: map[uint64]Collector{},
70 descIDs: map[uint64]struct{}{},
71 dimHashesByName: map[string]uint64{},
72 }
73}
74
75// NewPedanticRegistry returns a registry that checks during collection if each
76// collected Metric is consistent with its reported Desc, and if the Desc has

Callers 15

ExampleCounterVecFunction · 0.92
ExampleSummaryVecFunction · 0.92
ExampleGatherersFunction · 0.92
ExampleCollectorFuncFunction · 0.92
ExampleWrapCollectorWithFunction · 0.92
ExampleMetricVecFunction · 0.92
TestAlreadyRegisteredFunction · 0.92
TestWriteToTextfileFunction · 0.92
TestNewMultiTRegistryFunction · 0.92
ExampleRegistry_groupingFunction · 0.92

Calls

no outgoing calls

Tested by 15

ExampleCounterVecFunction · 0.74
ExampleSummaryVecFunction · 0.74
ExampleGatherersFunction · 0.74
ExampleCollectorFuncFunction · 0.74
ExampleWrapCollectorWithFunction · 0.74
ExampleMetricVecFunction · 0.74
TestAlreadyRegisteredFunction · 0.74
TestWriteToTextfileFunction · 0.74
TestNewMultiTRegistryFunction · 0.74
ExampleRegistry_groupingFunction · 0.74