From a7c8fee1d32a1c7ab6bb1a23c1f101558bc19026 Mon Sep 17 00:00:00 2001 From: David Ashpole Date: Tue, 18 Oct 2022 15:57:43 +0000 Subject: [PATCH] remove unneccessary variable --- exporters/prometheus/exporter.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/exporters/prometheus/exporter.go b/exporters/prometheus/exporter.go index 57a1e6f4508..95c7ef93bb8 100644 --- a/exporters/prometheus/exporter.go +++ b/exporters/prometheus/exporter.go @@ -105,7 +105,7 @@ func (c *collector) Collect(ch chan<- prometheus.Metric) { } } - for _, metricData := range c.getMetricData(metrics, c.withoutUnits) { + for _, metricData := range c.getMetricData(metrics) { if metricData.valueType == prometheus.UntypedValue { m, err := prometheus.NewConstHistogram(metricData.description, metricData.histogramCount, metricData.histogramSum, metricData.histogramBuckets, metricData.attributeValues...) if err != nil { @@ -138,7 +138,7 @@ type metricData struct { histogramBuckets map[float64]uint64 } -func (c *collector) getMetricData(metrics metricdata.ResourceMetrics, withoutUnits bool) []*metricData { +func (c *collector) getMetricData(metrics metricdata.ResourceMetrics) []*metricData { allMetrics := make([]*metricData, 0) c.createTargetInfoOnce.Do(func() {