-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Correlation ID Not Included in Request Headers in ABP Blazor Project #21419
Comments
Fix the problem by #21427 |
@maliming Thank you for fixing this issue on 9.0 branch Could you please back-port this fix on the 8.0 branch since we have a couple of projects on .NET 8.0 LTS that we need this patched there too. Also, it is my understanding that the fix bypasses the CorrelationId assignment/handling if not explicitly set. This does not directly solve the Is this expected behaviour, or should Abp be handling that in similar manner like |
hi
ok, I will do that. #21468
We do not set I think you can use your
|
Is there an existing issue for this?
Description
In an ABP Blazor application, the
X-Correlation-ID
header is not being properly populated in outgoing HTTP request headers. This causes the HTTP API middleware to handle an empty Correlation ID, which leads to inconsistencies in distributed tracing and logging.Specifically, the middleware logic on the HTTP API side contains the following:
Due to the
AddHeaders
behavior in the Blazor project, theX-Correlation-ID
header is always present but empty. As a result:Headers
collection includes a key forX-Correlation-ID
, causingcorrelationId.IsNullOrEmpty()
to return false.Reproduction Steps
Expected behavior
X-Correlation-ID
header should be populated with a valid, unique value in outgoing HTTP requests from the Blazor project.Actual behavior
X-Correlation-ID
header is included but contains an empty value in outgoing HTTP requests.Regression?
8.3.2
Blazor WASM
Development
Known Workarounds
To mitigate the issue, I replaced the existing DefaultCorrelationIdProvider implementation with a custom one in the Blazor application. This ensures that the Correlation ID is always set before outgoing requests.
Then, in the Blazor project’s
Startup
orProgram.cs
, I replaced the default implementation:This ensures that a valid Correlation ID is always provided for outgoing requests, resolving the issue until a proper fix is implemented in the ABP framework.
Version
8.3.2
User Interface
Blazor
Database Provider
EF Core (Default)
Tiered or separate authentication server
Tiered
Operation System
Windows (Default)
Other information
No response
The text was updated successfully, but these errors were encountered: