GetMetricWithLabelValues returns the Gauge 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 Gauge is created. It is possible to call this method without using the returned Gauge to only create
(lvs ...string)
| 200 | // latter has a much more readable (albeit more verbose) syntax, but it comes |
| 201 | // with a performance overhead (for creating and processing the Labels map). |
| 202 | func (v *GaugeVec) GetMetricWithLabelValues(lvs ...string) (Gauge, error) { |
| 203 | metric, err := v.MetricVec.GetMetricWithLabelValues(lvs...) |
| 204 | if metric != nil { |
| 205 | return metric.(Gauge), err |
| 206 | } |
| 207 | return nil, err |
| 208 | } |
| 209 | |
| 210 | // GetMetricWith returns the Gauge for the given Labels map (the label names |
| 211 | // must match those of the variable labels in Desc). If that label map is |
no test coverage detected