-
Notifications
You must be signed in to change notification settings - Fork 5
Description
Use case:
I want to introduce distributed tracing to my service. The main issue is that on every request I need to hold a context where I can store information provided by every layer (every layer is going to contribute to the distributed trace).
Problem:
The main issue is that most implementations for distributes tracing hold that context in a global state. This is not an issue for traditional web servers because every request happens in a execution where the global state is local to the request. When having async in place the problem is that the global state is share across the requests. Other languages (like golang for example) solve this by having a context object that can be passed from the controller to the all the involved entities (application service, domain service, repository, etc.) and that works because is a standard object part of the standard library.
Do you have any idea on how can this be addressed?