[BUG] Unable to include telemetry correlation headers
See original GitHub issueDescription We using this SDK in an SPA using fetch. The requests to the my .NET Web APIs do not include the telemetry correlation headers (‘Request-Id’ and ‘Request-Context’). Dependency telemetry is being collected just fine.
Request Headers
Request URL: https://api.domain.com:8082/resource
Request Method: GET
Status Code: 200
Referrer Policy: no-referrer-when-downgrade
:authority: api.domain.com:8082
:method: GET
:path: /resource
:scheme: https
accept: application/json
accept-encoding: gzip, deflate, br
accept-language: en-US,en;q=0.9,es;q=0.8,uk;q=0.7
content-type: application/json
origin: https://client.domain.com
referer: https://client.domain.com
sec-fetch-dest: empty
sec-fetch-mode: cors
sec-fetch-site: cross-site
user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko)
Chrome/80.0.3987.149 Safari/537.36
Response headers
access-control-allow-credentials: true
access-control-allow-origin: https://client.domain.com
access-control-expose-headers: Request-Context
content-encoding: gzip
content-length: 361
content-type: application/json; charset=utf-8
date: Sat, 28 Mar 2020 17:18:46 GMT
request-context: appId=cid-v1:<some id>
server: Microsoft-IIS/10.0
status: 200
x-powered-by: ASP.NET
-
OS/Browser: Windows / Chrome (Version 80.0.3987.149)
-
SDK Version [e.g. 22]: Version 2.5.2
-
How you initialized the SDK: NPM setup / webpack
import { ApplicationInsights } from '@microsoft/applicationinsights-web';
export class Logger {
_ai;
constructor() {
this._init();
}
_init() {
var options = {
config: {
instrumentationKey: 'my key',
appId: 'my-app',
autoTrackPageVisitTime: true,
disableAjaxTracking: true,
disableFetchTracking: false,
enableCorsCorrelation: true,
enableRequestHeaderTracking: true,
enableDebug: true,
loggingLevelConsole: 2,
}
this._ai = new ApplicationInsights(options);
this._ai.loadAppInsights();
}
// Logging methods excluded
}
Issue Analytics
- State:
- Created 3 years ago
- Comments:17 (10 by maintainers)
Top Results From Across the Web
How we used OpenTelemetry to fix a bug in OpenTelemetry
The trace headers ( baggage , traceparent , tracestate ) are send as multiple header fields: the nginx module added the value of...
Read more >Diagnose exceptions in web apps with Application Insights
Exceptions in web applications can be reported with Application Insights. You can correlate failed requests with exceptions and other events on ...
Read more >microsoft/ApplicationInsights-JS 2.5.4 on GitHub - NewReleases.io
#1240 [BUG] Telemetry correlation headers are not included for all fetch requests; #1229 [BUG] Unable to include telemetry correlation headers ...
Read more >Trace Context - W3C
This specification defines standard HTTP headers and a value format to ... The tracestate header includes the parent in a potentially ...
Read more >What is Distributed Tracing? How it Works & Use Cases
And with Datadog's unified platform, you can easily correlate traces with logs, infrastructure metrics, code profiles, and other telemetry data to quickly ...
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 FreeTop 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
Top GitHub Comments
Now also fully deployed to primary CDN
Fixed deployed as NPM and next CDN channels