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

Function NewPedanticRegistry

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

NewPedanticRegistry returns a registry that checks during collection if each collected Metric is consistent with its reported Desc, and if the Desc has actually been registered with the registry. Unchecked Collectors (those whose Describe method does not yield any descriptors) are excluded from the

()

Source from the content-addressed store, hash-verified

83// Collectors and Metrics will only provide consistent Descs. This Registry is
84// useful to test the implementation of Collectors and Metrics.
85func NewPedanticRegistry() *Registry {
86 r := NewRegistry()
87 r.pedanticChecksEnabled = true
88 return r
89}
90
91// Registerer is the interface for the part of a registry in charge of
92// registering and unregistering. Users of custom registries should use

Calls 1

NewRegistryFunction · 0.85