0

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

Prash
  • 544
  • 8
  • 24

1 Answers1

3

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

Marcin Grzejszczak
  • 10,624
  • 1
  • 16
  • 32
  • Marcin,any examples i can refer to? – Prash Apr 25 '18 at 03:27
  • @Marcin Grzejszczak,is dependencies added on producer and consumer for zipkin and rabbit or same? –  Apr 25 '18 at 17:46
  • I don't understand the question. Please read the documentation of sleuth and zipkin. You have everything described there – Marcin Grzejszczak Apr 25 '18 at 17:56
  • @Marcin Grzejszczak ,i read the documentation and it talks about StreamServer deprecation.My question is adding starter-zipkin,spring-rabbit dependencies, is enough to persist data through rabbitMQ? What are the dependencies are need to be added on producer side that is apps sending the traces? –  Apr 25 '18 at 19:32
  • So if you read the documentation (https://cloud.spring.io/spring-cloud-static/Edgware.SR3/single/spring-cloud.html#_sleuth_with_zipkin_via_rabbitmq_or_kafka) it's written exactly that you have to pass these two dependencies. Also it's written that you have to pass the `percentage` (1.3.x) or `probability` (2.0.x) versions. – Marcin Grzejszczak Apr 25 '18 at 19:36
  • For the server side please read https://github.com/openzipkin/zipkin/ and https://github.com/openzipkin/zipkin/tree/master/zipkin-collector/rabbitmq . Can we mark this question as answered? I've provided all the necessary information including sections in the documentation – Marcin Grzejszczak Apr 25 '18 at 19:44
  • I absolutely want mark as answered,before that i request you to review the project i am going to upload in GitHub. Please... –  Apr 26 '18 at 12:40
  • @MarcinGrzejszczak,would you please check this github project and provide your feedback on same and please help me to configure. https://github.com/javayp/stream-zipkin – Prash Apr 26 '18 at 14:08
  • I don't know if i can, cause you're constantly ignoring my comments. You haven't applied a single suggestion of mine. You're using the deprecated stream way of sending spans. You're setting up zipkin server manually even though i asked you not to. Please read the links I've sent previously and apply the suggestions. I can't help you more than that. I'm pretty certain that my answer should be marked as correct it answers your problem – Marcin Grzejszczak Apr 26 '18 at 14:29