Skip to content

Commit

Permalink
[pkg/trace/api] Remove usage of apiutil package
Browse files Browse the repository at this point in the history
  • Loading branch information
mx-psi committed Jan 5, 2023
1 parent 378ca6f commit 1726158
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pkg/trace/api/otlp.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 1726158

Please sign in to comment.