diff --git a/pkg/trace/api/otlp.go b/pkg/trace/api/otlp.go index d655962227359d..c4977d50710d05 100644 --- a/pkg/trace/api/otlp.go +++ b/pkg/trace/api/otlp.go @@ -21,7 +21,6 @@ import ( "github.com/DataDog/datadog-agent/pkg/otlp/model/attributes" "github.com/DataDog/datadog-agent/pkg/otlp/model/source" - "github.com/DataDog/datadog-agent/pkg/trace/api/apiutil" "github.com/DataDog/datadog-agent/pkg/trace/config" "github.com/DataDog/datadog-agent/pkg/trace/info" "github.com/DataDog/datadog-agent/pkg/trace/log" @@ -147,7 +146,7 @@ func (o *OTLPReceiver) ServeHTTP(w http.ResponseWriter, req *http.Request) { } r = gzipr } - rd := apiutil.NewLimitedReader(r, o.conf.OTLPReceiver.MaxRequestBytes) + rd := io.LimitReader(r, o.conf.OTLPReceiver.MaxRequestBytes) slurp, err := io.ReadAll(rd) if err != nil { http.Error(w, err.Error(), http.StatusBadRequest)