-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Labels
Description
Component(s)
receiver/datadog
What happened?
Description
Currently Datadog receiver does not implement GET /info needed for featuresdiscovery by Datadog SDK
This lead to the fallback mecanism of Datadog SDK which probe opentelemetry collector tracing endpoint with Content-lenght: 0 which lead to a stacktrace
Steps to Reproduce
Expected Result
No stacktrace.
Actual Result
2024-07-12T13:56:36.749Z error [email protected]/receiver.go:95 Unable to unmarshal reqs {"kind": "receiver", "name": "datadog", "data_type": "traces"}
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/datadogreceiver.(*datadogReceiver).handleTraces
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/[email protected]/receiver.go:95
net/http.HandlerFunc.ServeHTTP
net/http/server.go:2166
net/http.(*ServeMux).ServeHTTP
net/http/server.go:2683
go.opentelemetry.io/collector/config/confighttp.(*decompressor).ServeHTTP
go.opentelemetry.io/collector/config/[email protected]/compression.go:172
go.opentelemetry.io/collector/config/confighttp.(*ServerConfig).ToServer.maxRequestBodySizeInterceptor.func2
go.opentelemetry.io/collector/config/[email protected]/confighttp.go:485
net/http.HandlerFunc.ServeHTTP
net/http/server.go:2166
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp.(*middleware).serveHTTP
go.opentelemetry.io/contrib/instrumentation/net/http/[email protected]/handler.go:212
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp.NewMiddleware.func1.1
go.opentelemetry.io/contrib/instrumentation/net/http/[email protected]/handler.go:73
net/http.HandlerFunc.ServeHTTP
net/http/server.go:2166
go.opentelemetry.io/collector/config/confighttp.(*clientInfoHandler).ServeHTTP
go.opentelemetry.io/collector/config/[email protected]/clientinfohandler.go:26
net/http.serverHandler.ServeHTTP
net/http/server.go:3137
net/http.(*conn).serve
net/http/server.go:2039
Collector version
v0.104.0
Environment information
Environment
OS: (e.g., "Ubuntu 20.04")
Compiler(if manually compiled): (e.g., "go 14.2")
OpenTelemetry Collector configuration
receivers:
datadog:
endpoint: 0.0.0.0:8080
read_timeout: 60s
processors:
probabilistic_sampler:
sampling_percentage: 0
exporters:
debug:
verbosity: detailed
service:
pipelines:
traces:
receivers: [datadog]
processors: [probabilistic_sampler]
exporters: [debug]
Log output
No response
Additional context
I can handle the fix.
To quick fix we can just check content length:0 of the http request and return same response code 400.