Skip to content

Commit

Permalink
remove unneccessary variable
Browse files Browse the repository at this point in the history
  • Loading branch information
dashpole committed Oct 19, 2022
1 parent 0d4cae7 commit a7c8fee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions exporters/prometheus/exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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() {
Expand Down

0 comments on commit a7c8fee

Please sign in to comment.