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
()
| 83 | // Collectors and Metrics will only provide consistent Descs. This Registry is |
| 84 | // useful to test the implementation of Collectors and Metrics. |
| 85 | func 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 |