Fetch instrumentation does not keep original request headers
See original GitHub issuePlease answer these questions before submitting a bug report.
What version of OpenTelemetry are you using?
0.19
What version of Node are you using?
v15.13.0
Please provide the code you used to setup the OpenTelemetry SDK
const tracerProvider = new WebTracerProvider(config.telemetry.provider)
tracerProvider.addSpanProcessor(new BatchSpanProcessor(new ZipkinExporter(config.telemetry.exporter)))
tracerProvider.addSpanProcessor(new SimpleSpanProcessor(new ConsoleSpanExporter()))
registerInstrumentations({
instrumentations: [new DocumentLoadInstrumentation(), new FetchInstrumentation()],
tracerProvider,
})
tracerProvider.register({ contextManager: new ZoneContextManager() })
What did you do?
Nothing more than installing the packages and adding the above snippet imported at the entrypoint of the application.
What did you expect to see?
Original request headers (notably a x-authorization header for authenticated requests) to be left in the instrumented request.
What did you see instead?
Original request headers are stripped, only the traceparent header is present.
Additional context
The fetch instrumentation is preventing any and all authenticated requests (which, given the application I’m working on, is all of them).
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
fetch() does not send headers? - Stack Overflow
I have disabled service worker. I have tried to create Request and specifically add headers using req.headers.append() . The headers still ...
Read more >Access-Control-Allow-Headers - HTTP - MDN Web Docs
Although CORS-safelisted request headers are always allowed and don't usually need to be listed in Access-Control-Allow-Headers , listing them ...
Read more >Manual Instrumentation | OpenTelemetry
The first step is to get a handle to an instance of the OpenTelemetry interface. ... Tell OpenTelemetry to inject the context in...
Read more >OpenTelemetry Browser Instrumentation - Honeycomb
In this post, I'll walk through getting started on browser instrumentation so you can get answers to any of your questions.
Read more >Modify Outgoing Request Header - Akamai TechDocs
Use this behavior to decide how selected request headers going upstream towards the origin should be processed. For example, you can add headers...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@dyladan : Do you missing the close? Regards, Sascha
I think this issue was fixed by #2466 @SolarLiner can you please confirm? If not I will close this issue in a week