Description
Hi there. We have Kubernetes cluster where we run Datadog agent and exporting traces via Opentelemetry SDK manual instrumentated. I get a lot of errors
textPayload: "2025/01/20 04:50:21 http: superfluous response.WriteHeader call from go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/request.(*RespWriterWrapper).writeHeader (resp_writer_wrapper.go:78)"
Environment
- OS: Linux
- Architecture: x86
- Go Version: 1.23
go.opentelemetry.io/contrib version: v0.20.0
Datadog agent version : v7.60.0
Steps To Reproduce
- Using this code ...
func (th TracingHelpers) WithHTTPTraceMetadata() func(handler http.Handler) http.Handler {
return func(next http.Handler) http.Handler {
return http.HandlerFunc(
func(w http.ResponseWriter, r *http.Request) {
span := oteltrace.SpanFromContext(r.Context())
if span.IsRecording() {
// Add standard attributes
span.SetAttributes(
tracing.Attach("env", th.environment),
)
// Set trace context header
spanCtx := span.SpanContext()
if spanCtx.IsValid() && spanCtx.IsSampled() {
traceHeader := spanCtx.TraceID().String()
w.Header().Set("X-custom-header", traceHeader)
}
}
next.ServeHTTP(w, r)
})
}
}
- Run ...
- See error ...
Expected behavior
A clear and concise description of what you expected to happen.
Datadog agent pod is logging a lot of these errors
textPayload: "2025/01/20 04:50:21 http: superfluous response.WriteHeader call from go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/request.(*RespWriterWrapper).writeHeader (resp_writer_wrapper.go:78)"
Description
Hi there. We have Kubernetes cluster where we run Datadog agent and exporting traces via Opentelemetry SDK manual instrumentated. I get a lot of errors
textPayload: "2025/01/20 04:50:21 http: superfluous response.WriteHeader call from go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/request.(*RespWriterWrapper).writeHeader (resp_writer_wrapper.go:78)"Environment
go.opentelemetry.io/contribversion: v0.20.0Datadog agentversion : v7.60.0Steps To Reproduce
Expected behavior
A clear and concise description of what you expected to happen.
Datadog agent pod is logging a lot of these errors