CorrelationId in logs from WebApi #7332
Unanswered
giovanni-ferrari
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello everyone,
I'm trying to enable correlationId logs using Serilog CorrelationId enricher.
The problem I have right now is that correlationId works in WebApi controller and the corresponding injected services, but gets lost as soon as the context switches to the actor system.
I guess the issue is related to the fact Serilog CorrelationID enricher is based on "AsyncLocal", that works with the async/await chain from the controller, but does not work from actor to actor.
Is there a solution to propagate a correlationId in Akka.Net, so that logs across actors (and potentially across cluster nodes) can be related?
Beta Was this translation helpful? Give feedback.
All reactions