Skip to content

Commit 790ad6a

Browse files
Extract Labels not from Child object but from Parent (where all other labels for values are extracted)
Signed-off-by: gadyag <[email protected]>
1 parent c487740 commit 790ad6a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

exporter/collector.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ func (mc JSONMetricCollector) Collect(ch chan<- prometheus.Metric) {
8989
m.Desc,
9090
prometheus.UntypedValue,
9191
floatValue,
92-
extractLabels(mc.Logger, jdata, m.LabelsJSONPaths)...,
92+
extractLabels(mc.Logger, mc.Data, m.LabelsJSONPaths)...,
9393
)
9494
} else {
9595
level.Error(mc.Logger).Log("msg", "Failed to convert extracted value to float64", "path", m.ValueJSONPath, "value", value, "err", err, "metric", m.Desc)

0 commit comments

Comments
 (0)