You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import AWSXRay from 'aws-xray-sdk-core';
import { captureFetchGlobal } from 'aws-xray-sdk-fetch';
captureFetchGlobal();
var segment = new AWSXRay.Segment('test');
var ns = AWSXRay.getNamespace();
ns.run(async function () {
AWSXRay.setSegment(segment);
fetch('http://localhost:3000')
segment.close();
});
I would expect localhost:3000 to receive the x-amzn-trace-id header, but it doesn't.
When changing the fetch call like this: fetch(new Request("http://localhost:3000")); it works.
Working on a PR to fix this.
The text was updated successfully, but these errors were encountered:
berndfuhrmann
added a commit
to berndfuhrmann/aws-xray-sdk-node
that referenced
this issue
Sep 20, 2024
Consider this code
I would expect
localhost:3000
to receive thex-amzn-trace-id
header, but it doesn't.When changing the fetch call like this:
fetch(new Request("http://localhost:3000"));
it works.Working on a PR to fix this.
The text was updated successfully, but these errors were encountered: