(metrics []*cm.MetricFamily)
| 208 | } |
| 209 | |
| 210 | func getMetricLabels(metrics []*cm.MetricFamily) map[string]map[string]string { |
| 211 | metricLabels := map[string]map[string]string{} |
| 212 | for _, metricFamily := range metrics { |
| 213 | metricName := metricFamily.GetName() |
| 214 | metricLabels[metricName] = map[string]string{} |
| 215 | for _, metric := range metricFamily.GetMetric() { |
| 216 | for _, labelPair := range metric.GetLabel() { |
| 217 | metricLabels[metricName][labelPair.GetName()] = labelPair.GetValue() |
| 218 | } |
| 219 | } |
| 220 | } |
| 221 | return metricLabels |
| 222 | } |
no test coverage detected