Skip to content

Commit

Permalink
Extract Labels not from Child object but from Parent (where all other…
Browse files Browse the repository at this point in the history
… labels for values are extracted)
  • Loading branch information
Gleb-Gadyatskiy committed Nov 18, 2021
1 parent c487740 commit caa66fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion exporter/collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit caa66fa

Please sign in to comment.