diff --git a/cmd/opentelemetry-collector/app/defaults/default_config.go b/cmd/opentelemetry-collector/app/defaults/default_config.go index fbc8ad9c586..256667093ff 100644 --- a/cmd/opentelemetry-collector/app/defaults/default_config.go +++ b/cmd/opentelemetry-collector/app/defaults/default_config.go @@ -124,6 +124,7 @@ func createReceivers(component ComponentType, zipkinHostPort string, factories c } recvs := map[string]configmodels.Receiver{ "jaeger": jaeger, + "otlp": factories.Receivers["otlp"].CreateDefaultConfig(), } if zipkinHostPort != "" && zipkinHostPort != ports.PortToHostPort(0) { zipkin := factories.Receivers["zipkin"].CreateDefaultConfig().(*zipkinreceiver.Config) @@ -168,7 +169,7 @@ func createExporters(component ComponentType, storageTypes string, factories con return exporters, nil } -func enableAgentUDPEndpoints(jaeger *jaegerreceiver.Config) configmodels.Receivers { +func enableAgentUDPEndpoints(jaeger *jaegerreceiver.Config) { if _, ok := jaeger.Protocols["thrift_compact"]; !ok { jaeger.Protocols["thrift_compact"] = &receiver.SecureReceiverSettings{ ReceiverSettings: configmodels.ReceiverSettings{ @@ -183,10 +184,6 @@ func enableAgentUDPEndpoints(jaeger *jaegerreceiver.Config) configmodels.Receive }, } } - recvs := configmodels.Receivers{ - "jaeger": jaeger, - } - return recvs } func receiverNames(receivers configmodels.Receivers) []string { diff --git a/cmd/opentelemetry-collector/app/defaults/default_config_test.go b/cmd/opentelemetry-collector/app/defaults/default_config_test.go index 9ba700428c0..9450d3fd697 100644 --- a/cmd/opentelemetry-collector/app/defaults/default_config_test.go +++ b/cmd/opentelemetry-collector/app/defaults/default_config_test.go @@ -51,7 +51,7 @@ func TestService(t *testing.T) { Pipelines: configmodels.Pipelines{ "traces": &configmodels.Pipeline{ InputType: configmodels.TracesDataType, - Receivers: []string{"jaeger"}, + Receivers: []string{"otlp", "jaeger"}, Exporters: []string{"jaeger"}, }, }, @@ -68,7 +68,7 @@ func TestService(t *testing.T) { Pipelines: configmodels.Pipelines{ "traces": &configmodels.Pipeline{ InputType: configmodels.TracesDataType, - Receivers: []string{"jaeger"}, + Receivers: []string{"otlp", "jaeger"}, Processors: []string{"resource"}, Exporters: []string{elasticsearchexporter.TypeStr, kafkaexporter.TypeStr, memoryexporter.TypeStr}, }, @@ -118,7 +118,7 @@ func TestService(t *testing.T) { Pipelines: configmodels.Pipelines{ "traces": &configmodels.Pipeline{ InputType: configmodels.TracesDataType, - Receivers: []string{"jaeger", "zipkin"}, + Receivers: []string{"otlp", "jaeger", "zipkin"}, Exporters: []string{elasticsearchexporter.TypeStr}, }, },