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

Fetch instrumentation fix #205

Closed ODEit closed 4 years ago

ODEit commented 4 years ago

heya, sorry about a pr to the same file so soon haha... Found an unintended consequence in the last one. The unintended consequence is this.

In normal browser fetch, if a request object and options object are both passed, and both have a headers property, the request object's headers property is overwritten by the options headers. The current shim doesn't do this, it adds the option headers to the request object's headers.

This pr should remedy that.