diff --git a/comp/otelcol/otlp/internal/serializerexporter/exporter_test.go b/comp/otelcol/otlp/internal/serializerexporter/exporter_test.go index dd496cf19474a..7a30dd9286b6d 100644 --- a/comp/otelcol/otlp/internal/serializerexporter/exporter_test.go +++ b/comp/otelcol/otlp/internal/serializerexporter/exporter_test.go @@ -10,7 +10,7 @@ import ( "testing" "github.com/stretchr/testify/assert" - "go.opentelemetry.io/collector/exporter/exportertest" + "go.opentelemetry.io/collector/component/componenttest" "go.opentelemetry.io/collector/pdata/pmetric" "github.com/DataDog/datadog-agent/pkg/config" @@ -190,11 +190,10 @@ func Test_ConsumeMetrics_Tags(t *testing.T) { tt.setConfig(t) } rec := &metricRecorder{} - f := NewFactory(rec) - exp, err := f.CreateMetricsExporter( - context.Background(), - exportertest.NewNopCreateSettings(), - f.CreateDefaultConfig(), + exp, err := newExporter( + componenttest.NewNopTelemetrySettings(), + rec, + NewFactory(rec).CreateDefaultConfig().(*exporterConfig), ) if err != nil { t.Errorf("newExporter() returns unexpected error: %v", err)