smallrye / smallrye-context-propagation

SmallRye implementation of MicroProfile Context Propagation
Apache License 2.0
29 stars 24 forks source link

Support plans for Java Reactor Project? #261

Open jarpz opened 3 years ago

jarpz commented 3 years ago

There are plans to support Java Reactor with this model of context-propagation?

Reactor implements reactive-streams specification.

Regads

FroMage commented 3 years ago

Hi,

Not right now, but if you want to provide support via a PR, we could add it.

lenalebt commented 3 years ago

Came here to find out how to implement this when using reactor together with quarkus. Just that the next person has it a bit easier in the future: It seems to be enough for reactor to work with quarkus if you follow advice in https://github.com/opentracing-contrib/java-reactor#non-agent-configuration

It boils down getting an io.opentracing.Tracer tracer injected and run this once on startup of your application:

Hooks.onEachOperator(TracedSubscriber.asOperator(tracer))
Hooks.onLastOperator(TracedSubscriber.asOperator(tracer))

Tested in JVM & native mode. I'm unsure whether it eats kittens along the way, but I do get trace IDs propagated this way.