opentracing-contrib / java-reactor

OpenTracing instrumentation for Reactor
Apache License 2.0
12 stars 7 forks source link

TracedSubscriber changes threading #13

Open randallt opened 3 years ago

randallt commented 3 years ago

Hi,

We ran into an issue where the Java SpecialAgent broke a Reactor application. Apparently the application is using a block() call (we know this is probably an anti-pattern and are looking to fix it) that works fine using the FluxElapsed.ElapsedSubscriber, but fails when the TracedSubscriber wrapper is added.

It looks like this is due to the fact that the threading can change since TracedSubscriber implements the SpanSubscription interface which always returns Fuseable.NONE for Fuseable.QueueSubscription.requestFusion.

Would it be possible to preserve the fusion mode from the wrapped subscriber instead of always returning NONE?

jam01 commented 3 years ago

I'm not entirely sure. I've been removed from reactor for a couple of years now. If there's a PR you'd like to submit I'd be happy to take a look.