-
Notifications
You must be signed in to change notification settings - Fork 240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Telemetry correlation headers are not included for all fetch requests #1240
Comments
MSNev
pushed a commit
that referenced
this issue
Apr 3, 2020
MSNev
pushed a commit
that referenced
this issue
Apr 3, 2020
MSNev
added a commit
that referenced
this issue
Apr 7, 2020
Fixed deployed as NPM and next CDN channels |
Now also fully deployed to primary CDN |
This was referenced Apr 30, 2020
Closed
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I am experiencing the same as @tcihak-fqa, and I have a similar setup.
After upgrading @microsoft/applicationinsights-web to v2.5.3 (from v2.4.4), correlation headers are missing in all
fetch
requests.I tested to enable the new W3C distributed tracing mode
...still no correlation headers of any sort.
No other distributedTracingMode options seem to work either.
This must be a bug, it worked before upgrading.
@MSNev :
I'm running an ASP.NET core app with kestrel on https://localhost:5001.
No fetch polyfill is used (polyfill for fetch is dynamically loaded only if the browser does not have it natively - with the browser I use for testing the native fetch API is supported).
I use JS modules (traspiled from TypeScript) and import @microsoft/applicationinsights-web - it is included in webpack bundling from node_modules.
The HTML/CSS/JS code is hosted in the same web application; on the same domain/port as the API I'm calling with fetch (where the correlation headers are missing). No CORS should be required.
FYI: It made no difference to add "localhost:5001" to correlationHeaderDomains,
I had a few more configuration settings than in my code below, but I have tested stripping the configuration down to a minimum as follows and I still have the problem:
@josundt I think I found the root cause for your issue, basically the code is adding the headers to the intercepted fetch request however if you don't pass the optional 2nd parameter (init), it creates one internally and populated the headers on this object... BUT, it doesn't pass this onto the real fetch!!!
As a workaround, if you pass a value as part of this 2nd parameter the headers should be sent correctly.
The text was updated successfully, but these errors were encountered: