dd-trace-js icon indicating copy to clipboard operation
dd-trace-js copied to clipboard

using fetch as http client doesn't add trace_id & span_id as Headers

Open vigohe opened this issue 1 year ago • 1 comments

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

vigohe avatar Jul 13 '22 01:07 vigohe

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.

rochdev avatar Jul 13 '22 15:07 rochdev

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.

pinko-fowle avatar Jan 09 '23 21:01 pinko-fowle