You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Logging frameworks have a thing called an MDC. It's a way to store extra metadata that then gets logged with every message in that thread. They use ThreadLocal to implement this. With this move to promises, the thread a request is running on is not often the same one that initiated it.
I propose we add a boolean optional function call on promises, with a static global setter as well, that says to "preserveIssuerMdc" on promise resolutions.
If this is true, we build out the resolving thread's mdc to match the issuer's mdc exactly before calling promise callbacks.
The issuer is determined to be the caller of done(), fail(), progress(), then(). Every instantiation of this would store a reference to the parent mdc.
If anyone's interested, i'd be happy to make a fork to do this change. It might be somewhat expansive.
The text was updated successfully, but these errors were encountered:
Hiya - could I trouble you to propose the actual method signatures? Let's see how we can seamlessly add this - it sounds very useful to debug concurrent processes.
Logging frameworks have a thing called an MDC. It's a way to store extra metadata that then gets logged with every message in that thread. They use ThreadLocal to implement this. With this move to promises, the thread a request is running on is not often the same one that initiated it.
I propose we add a boolean optional function call on promises, with a static global setter as well, that says to "preserveIssuerMdc" on promise resolutions.
If this is true, we build out the resolving thread's mdc to match the issuer's mdc exactly before calling promise callbacks.
The issuer is determined to be the caller of done(), fail(), progress(), then(). Every instantiation of this would store a reference to the parent mdc.
If anyone's interested, i'd be happy to make a fork to do this change. It might be somewhat expansive.
The text was updated successfully, but these errors were encountered: