MetricNameFromLabels extracts the metric name from a list of Prometheus Labels.
(lbls labels.Labels)
| 70 | |
| 71 | // MetricNameFromLabels extracts the metric name from a list of Prometheus Labels. |
| 72 | func MetricNameFromLabels(lbls labels.Labels) (metricName string, err error) { |
| 73 | metricName = lbls.Get(model.MetricNameLabel) |
| 74 | if metricName == "" { |
| 75 | err = errNoMetricNameLabel |
| 76 | } |
| 77 | return |
| 78 | } |
no test coverage detected