Search code examples
spring-bootrabbitmqspring-cloud-streamzipkinspring-cloud-sleuth

Spring Cloud Zipkin with RabbitMQ not persisting in MYSQL


I have done all the possible matches and mix-up of dependency and still not able to record traces in zipkin ans store it in MYSQL using RabbitMQ.

Still i can see the trace and span id's in console and nothing beyond this.

Someone please take a look at the code in github from below location.

Github code: https://github.com/javayp/distributed-tracing-1


Solution

  • You've mixed almost everything you could have mixed. On the app side you're using both the deprecated zipkin server and the deprecated client. On the server side you're using deprecated zipkin server.

    My suggestion is that you go through the documentation https://cloud.spring.io/spring-cloud-static/Edgware.SR3/single/spring-cloud.html#_spring_cloud_sleuth and read that the stream servers are deprecated and you should use the openzipkin zipkin server with rabbitmq support (https://github.com/openzipkin/zipkin/tree/master/zipkin-collector/rabbitmq).

    On the consumer side use https://cloud.spring.io/spring-cloud-static/Edgware.SR3/single/spring-cloud.html#_sleuth_with_zipkin_via_rabbitmq_or_kafka . It really is as simple as that. Also don't forget to turn on the sampling percentage to 1.0