Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
keisku committed Jun 18, 2022
1 parent 1a4e73f commit 7956d62
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ package instrumentationscope // import "github.com/open-telemetry/opentelemetry-

import (
"github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/model/internal/utils"

"go.opentelemetry.io/collector/pdata/pcommon"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,12 @@ import (
"strconv"

"github.com/DataDog/datadog-agent/pkg/quantile"
"go.opentelemetry.io/collector/pdata/pmetric"
"go.uber.org/zap"

"github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/model/attributes"
"github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/model/internal/instrumentationlibrary"
"github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/model/internal/instrumentationscope"
"go.opentelemetry.io/collector/pdata/pmetric"
"go.uber.org/zap"
)

const metricName string = "metric name"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import (

"github.com/DataDog/datadog-agent/pkg/quantile"
"github.com/DataDog/datadog-agent/pkg/quantile/summary"
"github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/model/attributes"
gocache "github.com/patrickmn/go-cache"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
Expand All @@ -34,6 +33,8 @@ import (
"go.uber.org/zap"
"go.uber.org/zap/zapcore"
"go.uber.org/zap/zaptest/observer"

"github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/model/attributes"
)

func TestIsCumulativeMonotonic(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions exporter/datadogexporter/metrics_exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,15 @@ func translatorFromConfig(logger *zap.Logger, cfg *config.Config, hostProvider p
options = append(options, translator.WithResourceAttributesAsTags())
}

if cfg.Metrics.ExporterConfig.InstrumentationScopeMetadataAsTags && cfg.Metrics.ExporterConfig.InstrumentationLibraryMetadataAsTags {
if cfg.Metrics.ExporterConfig.InstrumentationScopeMetadataAsTags && cfg.Metrics.ExporterConfig.InstrumentationLibraryMetadataAsTags { // nolint SA1019
return nil, fmt.Errorf("cannot use both instrumentation_library_metadata_as_tags(deprecated) and instrumentation_scope_metadata_as_tags")
}

if cfg.Metrics.ExporterConfig.InstrumentationScopeMetadataAsTags {
options = append(options, translator.WithInstrumentationScopeMetadataAsTags())
}

if cfg.Metrics.ExporterConfig.InstrumentationLibraryMetadataAsTags {
if cfg.Metrics.ExporterConfig.InstrumentationLibraryMetadataAsTags { // nolint SA1019
options = append(options, translator.WithInstrumentationLibraryMetadataAsTags())
}

Expand Down

0 comments on commit 7956d62

Please sign in to comment.