Skip to content

Commit

Permalink
Enable OTEL receiver by default (#2279)
Browse files Browse the repository at this point in the history
Signed-off-by: Pavol Loffay <[email protected]>
  • Loading branch information
pavolloffay authored Jun 4, 2020
1 parent 7a5f830 commit b66f25c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
7 changes: 2 additions & 5 deletions cmd/opentelemetry-collector/app/defaults/default_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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{
Expand All @@ -183,10 +184,6 @@ func enableAgentUDPEndpoints(jaeger *jaegerreceiver.Config) configmodels.Receive
},
}
}
recvs := configmodels.Receivers{
"jaeger": jaeger,
}
return recvs
}

func receiverNames(receivers configmodels.Receivers) []string {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
},
},
Expand All @@ -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},
},
Expand Down Expand Up @@ -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},
},
},
Expand Down

0 comments on commit b66f25c

Please sign in to comment.