Support multiple subscriptions for Reactor spans #3751
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Explores refactoring the Reactor 3.x async strategy to use an operator instead of composing over the various
doOnSignal
methods. Using an operator provides closer access to the Subscriber/Subscription allowing it to be decorated so that I can intercept each subscription and the signals sent to them.What this would enable is allowing multiple spans to be started/ended for a Reactor publisher, one for the original method call plus one for each subsequent subscription if the publisher is re-used, which can happen accidentally or can be intentional if treated as a Reader/IO monad.
It looks like RxJava 2/3 also support the same approach although it is a bit more involved as there are separate operator/observer interfaces for each of the reactive types.
Discussion: #3753