diff --git a/comp/otelcol/otlp/components/exporter/serializerexporter/factory.go b/comp/otelcol/otlp/components/exporter/serializerexporter/factory.go index 6c6b9f8fcbbe4..5705b124d59a1 100644 --- a/comp/otelcol/otlp/components/exporter/serializerexporter/factory.go +++ b/comp/otelcol/otlp/components/exporter/serializerexporter/factory.go @@ -96,6 +96,11 @@ func NewFactoryForAgent(s serializer.MetricSerializer, enricher tagenricher, hos // NewFactory creates a new factory for the serializer exporter. func NewFactory() exp.Factory { + return NewFactoryWithType(TypeStr) +} + +// NewFactoryWithType creates a new factory for the serializer exporter with the given type string. +func NewFactoryWithType(typeStr string) exp.Factory { var options []otlpmetrics.TranslatorOption if !pkgdatadog.MetricRemappingDisabledFeatureGate.IsEnabled() { options = append(options, otlpmetrics.WithRemapping()) @@ -119,7 +124,7 @@ func NewFactory() exp.Factory { }, options: options, } - cfgType := component.MustNewType(TypeStr) + cfgType := component.MustNewType(typeStr) return exp.NewFactory( cfgType, newDefaultConfig,