Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[chore][exporter/sumologic] enable exhaustive linter #25159

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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")
}