From 790ad6ae933aaef85cc8748174d79c8b68501122 Mon Sep 17 00:00:00 2001 From: gadyag Date: Thu, 18 Nov 2021 11:01:55 -0500 Subject: [PATCH] Extract Labels not from Child object but from Parent (where all other labels for values are extracted) Signed-off-by: gadyag --- exporter/collector.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exporter/collector.go b/exporter/collector.go index 7d61bf70..e66e9414 100644 --- a/exporter/collector.go +++ b/exporter/collector.go @@ -89,7 +89,7 @@ func (mc JSONMetricCollector) Collect(ch chan<- prometheus.Metric) { m.Desc, prometheus.UntypedValue, floatValue, - extractLabels(mc.Logger, jdata, m.LabelsJSONPaths)..., + extractLabels(mc.Logger, mc.Data, m.LabelsJSONPaths)..., ) } else { level.Error(mc.Logger).Log("msg", "Failed to convert extracted value to float64", "path", m.ValueJSONPath, "value", value, "err", err, "metric", m.Desc)