RegistererWithKVName wraps the provided Registerer with the KV name label. If a nil reg is provided, a nil registry is returned
(reg prometheus.Registerer, name string)
| 15 | // RegistererWithKVName wraps the provided Registerer with the KV name label. If a nil reg |
| 16 | // is provided, a nil registry is returned |
| 17 | func RegistererWithKVName(reg prometheus.Registerer, name string) prometheus.Registerer { |
| 18 | if reg == nil { |
| 19 | return nil |
| 20 | } |
| 21 | |
| 22 | return prometheus.WrapRegistererWith(prometheus.Labels{"kv_name": name}, reg) |
| 23 | } |
| 24 | |
| 25 | // getCasErrorCode converts the provided CAS error into the code that should be used to track the operation |
| 26 | // in metrics. |
no outgoing calls
no test coverage detected