Ali
Ali

Reputation: 450

How to use spring cloud sleuth for RabbitListener and RabbitTemplate

I want to send RabbitMQ messages tracking event to Zipkin with using spring cloud sleuth, After many research I found some configuration added recently to spring in order to manage it you can find in here, But unfortunately there is not any documentation that explains how can we configure it, I tried many ways but I couldn't send tracking events to Zipkin.

Please advice

Upvotes: 1

Views: 1084

Answers (1)

TYsewyn
TYsewyn

Reputation: 622

The configuration you're referring to is for the instrumentation of messaging systems, not for sending traces to zipkin using a messaging system.

You should look at this auto-configuration, and especially this sender config.

What you want to do has also been documented here: https://cloud.spring.io/spring-cloud-sleuth/2.0.x/single/spring-cloud-sleuth.html#_sleuth_with_zipkin_over_rabbitmq_or_kafka

You should only need to add spring-cloud-starter-zipkin and spring-rabbit to your dependencies. If you want to change the default queue (which is zipkin), then you'll need to add spring.zipkin.rabbitmq.queue to your properties.

Upvotes: 1

Related Questions