[BUG] disableCorrelationHeaders does not work as expected
Description/Screenshot
Documentation for disableCorrelationHeaders attribute says
If false, the SDK adds two headers ('Request-Id' and 'Request-Context') to all dependency requests to correlate them with corresponding requests on the server side. Default is false.
But the mentioned header Request-Id is sent only if attribute enableCorsCorrelation is set to true and Request-Context is sent only if enableCorsCorrelation is set to true and appId is not undefined.
Steps to Reproduce
- OS/Browser: win 11, edge
- SDK Version [e.g. 22]:
"@microsoft/applicationinsights-clickanalytics-js": "^3.2.1" - How you initialized the SDK: npm
Expected behavior
I expect that Request-Id and Request-Context will be sent when disableCorrelationHeaders is false.
The current logic (by design) for the two configs is:
- if
disableCorrelationHeadersis set totrue, regardless of other settings, correlation headers will not be added. - if
disableCorrelationHeadersis set tofalseandenableCorsCorrelationis set tofalse, correlation headers will not be added. - if
disableCorrelationHeadersis set tofalseandenableCorsCorrelationis set totrue, correlation headers will be added based oncorrelationHeaderExcludePatterns,correlationHeaderDomainsandcorrelationHeaderExcludedDomains
thank you for clarification