aws / aws-xray-sdk-node

The official AWS X-Ray SDK for Node.js.
Apache License 2.0
266 stars 155 forks source link

Pass dispatcher options to global fetch #653

Closed Kruspe closed 1 month ago

Kruspe commented 2 months ago

*Issue: #650

Description of changes: As the global fetch in node follows the undici fetch implementation there is an extra dispatcher option that can be passed but is not supported by the Request class. We check if the extra option is supplied and if so pass the option directly to the global fetch call. All other paths already pass all options as expected.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

jj22ee commented 1 month ago

The tests are failing on NodeJS v20.x. Can you take a look into them, perhaps my suggestion could fix them?

Kruspe commented 1 month ago

Hey sorry for the late update! I did not get a notification that the tests ran here. An update to Node 20 seems to have broken the previous implementation but your suggestion should work just fine. I'll keep a close look now but my guess would be that all the tests should now pass inside the GH actions.