dd-trace-js
dd-trace-js copied to clipboard
using fetch as http client doesn't add trace_id & span_id as Headers
Expected behaviour
When fetch
it's execute should add trace_id & span_id automatically as Headers
Actual behaviour When checking a trace between two services no dependency exists because the trace_id & span_id are missing
Steps to reproduce fetch("http://example.com");
Environment docker
- Operation system: docker image node:18-alpine
- Node.js version: node 18
- Tracer version: 2.10.0
- Agent version: 7.37.1
Changing this to a feature request since the reason this doesn't work is that fetch
is not supported yet so we don't have an integration for it.
There is some work in progress from back in April in #2010.
Node 18.13.0 just shipped fetch
without the experimental warning. The PR for that is nodejs/node#45287.