Closed abergs closed 5 years ago
@lmolkova - can you take a look?
ApplicationInsights SDKs or .NET never add x-correlation-id
headers.
@abergs are you sure this is the right header name? Please check if anything else in your app adds this header.
You are right. I grep'd after x-correlation-id and couldn't find anything. However it seems another nuget package adds the header. Sorry for disturbing.
We have an API endpoint which makes a lot of dependency calls (SQL, Redis etc). The result is that over 1,200 x-correlation-id headers are added to the response. Our client ( a .NET Core 2.2 app HttpClient) throws exceptions because the value of the header is larger than the maximum defined in HttpClient: https://github.com/dotnet/corefx/blob/master/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnection.cs#L519
Repro Steps
Actual Behavior
Adds over 1,200 "x-correlation-id: GUID-XXX-XXX-XXX-XXX"
Expected Behavior
Adds one or a limited amount of "x-correlation-id: GUID-XXXX-XXXX-XXX-XXX-XXX"
Version Info
SDK Version : 2.8.1 .NET Version : 4.7.1
How Application was onboarded with SDK(VisualStudio/StatusMonitor/Azure Extension) : OS : Visual Studio / Nuget Hosting Info (IIS/Azure WebApps/ etc) : Azure webapp (and IIS Express localhost)