Integrating Spring Cloud Sleuth with Spring boot amqp

amqp, rabbitmq, spring-boot, spring-cloud-sleuth

Solution

We don't instrument Spring AMQP out of the box. You can however use Spring Integration or Spring Cloud Stream that we do support and then everything will work out of the box. If you need to use Spring AMQP for some reason you'll have to instrument the code yourself (and sends us a PR ;) ).

Problem

Looking for an example that shows integrating spring cloud sleuth with spring boot amqp (rabbit) publisher and subscriber. I do see the following messages in the log 2016-10-21 08:35:15.708 INFO [producer,9148f56490e5742f,943ed050691842ab,false] 30928 --- [nio-8080-exec-1] a.b.c.controllers.MessagingController : Received Request to pulish with Activity OrderShipped 2016-10-21 08:35:15.730 INFO [producer,9148f56490e5742f,943ed050691842ab,false] 30928 --- [nio-8080-exec-1] a.b.c.service.ProducerService : Message published When I look at messages on Queue, I don't see traceId or any other details added to the header. Should I use MessagePostProcessor to add these to the header? Also what should be done on the receiving service?

Original source