-
Notifications
You must be signed in to change notification settings - Fork 501
Description
I wonder if anyone has advice on implementing tracing for an application that is single threaded and uses I/O driven concurrency to serve multiple requests. It seems to make sense to have a separate span for each concurrent request.
I understand that the current context storage implementation with thread-local storage works just fine when people use threads to implement concurrency. But I am not sure what would be the best way to handle multiple context stacks within the same thread.
Maybe I could implement a different context storage (i.e. RuntimeContextStorage
) that has methods to duplicate the current context stack, switch to another context stack, etc.? Then I would manage these context stacks manually. Do you think that this is possible? Or is there a better way to go about this?