-
-
Notifications
You must be signed in to change notification settings - Fork 106
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 Context #1
Comments
I accomplished essentially the same thing by passing in a simple Func argument to the constructor of the class that is the client to another API to which I wanted to pass the correlation ID. That function is then passed in startup; the implementation is simply httpContextAccessor.HttpContext.TraceIdentifier. |
@stevejgordon Do you have any time to implement this at some point soon? |
@Franklin89 Still thinking about it, just haven't had the time as yet. |
This work is completed and available since v2.0.0 https://github.com/stevejgordon/CorrelationId/releases/tag/rel%2F2.0.0 |
Currently the correlation ID is only exposed via the existing HttpContext.TraceIdentifier. This requires either access to the HttpContext or an IHttpContextAccessor to be able to get to the correlation ID.
I'm considering creating a custom "CorrelationContext" which will be available through DI so that the correlation ID can be more easily exposed in classes that don't already have easy access to HttpContext.
The text was updated successfully, but these errors were encountered: