diff --git a/exporter/collector.go b/exporter/collector.go index 0e588f5e..d7ba92a2 100644 --- a/exporter/collector.go +++ b/exporter/collector.go @@ -59,7 +59,7 @@ func (mc JSONMetricCollector) Collect(ch chan<- prometheus.Metric) { ch <- prometheus.MustNewConstMetric( m.Desc, - prometheus.UntypedValue, + m.ValueType, floatValue, extractLabels(mc.Logger, mc.Data, m.LabelsJSONPaths)..., ) @@ -92,7 +92,7 @@ func (mc JSONMetricCollector) Collect(ch chan<- prometheus.Metric) { if floatValue, err := SanitizeValue(value); err == nil { ch <- prometheus.MustNewConstMetric( m.Desc, - prometheus.UntypedValue, + m.ValueType, floatValue, extractLabels(mc.Logger, jdata, m.LabelsJSONPaths)..., )