From 8cebbda5501ef4d78d169b84221a60153326d700 Mon Sep 17 00:00:00 2001 From: "minquan.chen" Date: Fri, 11 Aug 2023 07:32:53 +0800 Subject: [PATCH] [chore][exporter/sumologic] enable exhaustive linter --- exporter/sumologicexporter/carbon_formatter.go | 2 +- exporter/sumologicexporter/graphite_formatter.go | 2 +- exporter/sumologicexporter/prometheus_formatter.go | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/exporter/sumologicexporter/carbon_formatter.go b/exporter/sumologicexporter/carbon_formatter.go index 5718e8f038a9..aed80272325c 100644 --- a/exporter/sumologicexporter/carbon_formatter.go +++ b/exporter/sumologicexporter/carbon_formatter.go @@ -78,7 +78,7 @@ func carbon2NumberRecord(record metricPair, dataPoint pmetric.NumberDataPoint) s // carbon2metric2String converts metric to Carbon2 formatted string. func carbon2Metric2String(record metricPair) string { var nextLines []string - + //exhaustive:enforce switch record.metric.Type() { case pmetric.MetricTypeGauge: dps := record.metric.Gauge().DataPoints() diff --git a/exporter/sumologicexporter/graphite_formatter.go b/exporter/sumologicexporter/graphite_formatter.go index d1c7ec43ef7f..d68bf9acd834 100644 --- a/exporter/sumologicexporter/graphite_formatter.go +++ b/exporter/sumologicexporter/graphite_formatter.go @@ -90,7 +90,7 @@ func (gf *graphiteFormatter) metric2String(record metricPair) string { var nextLines []string fs := newFields(record.attributes) name := record.metric.Name() - + //exhaustive:enforce switch record.metric.Type() { case pmetric.MetricTypeGauge: dps := record.metric.Gauge().DataPoints() diff --git a/exporter/sumologicexporter/prometheus_formatter.go b/exporter/sumologicexporter/prometheus_formatter.go index c1726e33e30b..bde966fd0e2e 100644 --- a/exporter/sumologicexporter/prometheus_formatter.go +++ b/exporter/sumologicexporter/prometheus_formatter.go @@ -311,7 +311,7 @@ func (f *prometheusFormatter) histogram2Strings(record metricPair) []string { // metric2String returns stringified metricPair func (f *prometheusFormatter) metric2String(record metricPair) string { var lines []string - + //exhaustive:enforce switch record.metric.Type() { case pmetric.MetricTypeGauge: lines = f.gauge2Strings(record) @@ -321,6 +321,7 @@ func (f *prometheusFormatter) metric2String(record metricPair) string { lines = f.summary2Strings(record) case pmetric.MetricTypeHistogram: lines = f.histogram2Strings(record) + case pmetric.MetricTypeExponentialHistogram: } return strings.Join(lines, "\n") }