GetMetricWithLabelValues returns the Counter for the given slice of label values (same order as the variable labels in Desc). If that combination of label values is accessed for the first time, a new Counter is created. It is possible to call this method without using the returned Counter to only c
(lvs ...string)
| 246 | // with a performance overhead (for creating and processing the Labels map). |
| 247 | // See also the GaugeVec example. |
| 248 | func (v *CounterVec) GetMetricWithLabelValues(lvs ...string) (Counter, error) { |
| 249 | metric, err := v.MetricVec.GetMetricWithLabelValues(lvs...) |
| 250 | if metric != nil { |
| 251 | return metric.(Counter), err |
| 252 | } |
| 253 | return nil, err |
| 254 | } |
| 255 | |
| 256 | // GetMetricWith returns the Counter for the given Labels map (the label names |
| 257 | // must match those of the variable labels in Desc). If that label map is |