Skip to content

Commit

Permalink
[chore][exporter/sumologic] enable exhaustive linter (#25159)
Browse files Browse the repository at this point in the history
relate:
#23266
  • Loading branch information
Frapschen authored Aug 11, 2023
1 parent 0454100 commit 951d460
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion exporter/sumologicexporter/carbon_formatter.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion exporter/sumologicexporter/graphite_formatter.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
3 changes: 2 additions & 1 deletion exporter/sumologicexporter/prometheus_formatter.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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")
}

0 comments on commit 951d460

Please sign in to comment.