Closed MovGP0 closed 6 years ago
Hi @MovGP0. This is by design since it needs to be (potentially) consumable from Singleton services. I have followed the patterns used by Microsoft for the HttpContextAccessor. The returned CorrelationId should be correct per scoped request despite the accessor being Singleton.
Are you seeing any issues with this when you are using it?
Marking as closed.
since
CorrelationContextAccessor
returns the correlation context of an request, it is probably a bad idea to have it as singleton, because parallel requests will overwrite theCorrelationContext
.I guess it should be injected per-request instead: