WrapRegistererWithPrefix returns a Registerer wrapping the provided Registerer. Collectors registered with the returned Registerer will be registered with the wrapped Registerer in a modified way. The modified Collector adds the provided prefix to the name of all Metrics it collects. Wrapping a nil
(prefix string, reg Registerer)
| 72 | // either Registerer will contain the ExistingCollector in the form it was |
| 73 | // provided to the respective registry. |
| 74 | func WrapRegistererWithPrefix(prefix string, reg Registerer) Registerer { |
| 75 | return &wrappingRegisterer{ |
| 76 | wrappedRegisterer: reg, |
| 77 | prefix: prefix, |
| 78 | } |
| 79 | } |
| 80 | |
| 81 | // WrapCollectorWith returns a Collector wrapping the provided Collector. The |
| 82 | // wrapped Collector will add the provided Labels to all Metrics it collects (as |
no outgoing calls