openzipkin / brave

Java distributed tracing implementation compatible with Zipkin backend services.
Apache License 2.0
2.36k stars 713 forks source link

Support for Reactive Rabbit MQ #1283

Open diegroepi opened 3 years ago

diegroepi commented 3 years ago

Feature: Instrumentation for Reactive RabbitMQ

Example Scenario Sleuth tracing does not work any more, after we have switched to the reactive rabbit mq implementation (reactor.rabbitmq.sender, reactor.rabbitmq.receiver - https://projectreactor.io/docs/rabbitmq/snapshot/reference/)

Looking forward to your feedback. Thanks!

codefromthecrypt commented 3 years ago

the primary concern of reactor is propagation of context. there's currently some code hiding in plain sight in sleuth around that, originally a deviation of how we handle rxjava here. https://github.com/spring-cloud/spring-cloud-sleuth/blob/76ad931b4298b18389d0a4ea739316c14682888b/spring-cloud-sleuth-instrumentation/src/main/java/org/springframework/cloud/sleuth/instrument/reactor/ScopePassingSpanSubscriber.java

anything that uses reactor will need to have context integration also for it to be of any use I think.

diegroepi commented 3 years ago

Thanks Adrian for the reply. Just to make sure that I understand correctly: We need both the Instrumentation for Reactive RabbitMQ as well as the context to be propagated throughout the rest of the application? Then I'd agree that one without the other would not be helpful.

Any idea if this will be a recommended approach for the future that makes sense to invest effort in? Is this a common gap that I adressed? Or how do you see the world of tracing in a reactive context? Are there alternatives?

Any feedback would be greatly appreciated. Best Regards!