lightstep / lightstep-tracer-javascript

Lightstep distributed tracing library for Node.js and the browser
https://lightstep.com
MIT License
77 stars 66 forks source link

fix(fetch): PUT/POSTs were failing #227

Closed kirbysayshi closed 4 years ago

kirbysayshi commented 4 years ago

Anything with a request body (content-length > 0) was failing when excluded from fetch tracing instrumentation due to using the initial input object instead of the created/normalized Request.

Creating a new request from an old request consumes the old request unless explicitly cloned, which would throw an error when the old, original request was passed to fetch!

I also made it slightly more explicit by not aliasing any existing names or relying on arguments.

sbaum1994 commented 4 years ago

Thanks!