filtering __name__
This commit is contained in:
parent
12fb8718d9
commit
28989ed607
@ -187,6 +187,9 @@ func (s byName) Less(i, j int) bool {
|
||||
func prometheusLabelSetToCadvisorLabels(promLabels model.Metric) map[string]string {
|
||||
labels := make(map[string]string)
|
||||
for k, v := range promLabels {
|
||||
if string(k) == "__name__" {
|
||||
continue
|
||||
}
|
||||
labels[string(k)] = string(v)
|
||||
}
|
||||
return labels
|
||||
|
@ -1682,9 +1682,6 @@ func (c *PrometheusCollector) collectContainersInfo(ch chan<- prometheus.Metric)
|
||||
copy(clabels, labels)
|
||||
copy(cvalues, values)
|
||||
for label, value := range metric.Labels {
|
||||
if label == "__name__" {
|
||||
continue
|
||||
}
|
||||
clabels = append(clabels, sanitizeLabelName(label))
|
||||
cvalues = append(cvalues, value)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user