WrapCollectorWith returns a Collector wrapping the provided Collector. The wrapped Collector will add the provided Labels to all Metrics it collects (as ConstLabels). The Metrics collected by the unmodified Collector must not duplicate any of those labels. WrapCollectorWith can be useful to work wi
(labels Labels, c Collector)
| 95 | // Then you can un-register the wrapped collector effectively un-registering the |
| 96 | // metrics registered by foo.New. |
| 97 | func WrapCollectorWith(labels Labels, c Collector) Collector { |
| 98 | return &wrappingCollector{ |
| 99 | wrappedCollector: c, |
| 100 | labels: labels, |
| 101 | } |
| 102 | } |
| 103 | |
| 104 | // WrapCollectorWithPrefix returns a Collector wrapping the provided Collector. The |
| 105 | // wrapped Collector will add the provided prefix to the name of all Metrics it collects. |
no outgoing calls