NewRegistry creates a new vanilla Registry without any Collectors pre-registered.
()
| 65 | // NewRegistry creates a new vanilla Registry without any Collectors |
| 66 | // pre-registered. |
| 67 | func 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 |
no outgoing calls