0

I have a client application with multiple channels as SOURCE/SINK. I want to send logs to Zipkin server.

According to my understanding, if spring finds spring cloud stream in classpath, Zipkin client defaults to messaging instead of sending logs through HTTP.

At client side:

Q1. Is there an automatic configuration for zipkin rabbit binding in such scenario? If not, what is default channel name of zipkin SOURCE channel?

Q2. Do I need to configure defaultSampler to AlwaysSampler()?

At Server side:

Q1. Do I need to create Zipkin server as a spring boot application for my use case or can I use the jar retrieved using: wget -O zipkin.jar 'https://search.maven.org/remote_content?g=io.zipkin.java&a=zipkin-server&v=LATEST&c=exec' ...as stated on https://zipkin.io/pages/quickstart.html ?

Q2. How do I configure zipkin SINK channel to destination?

Spring boot version: 1.5.9.RELEASE Spring cloud version: Edgware.RELEASE

  • At client side, I mapped `sleuth` channel with `zipkin` destination. And for zipkin server, I used jar instead of creating zipkin server as a spring boot application. To enable rabbit listener on server side, I have to set environment variable RABBIT_ADDRESSES="localhost" and that did the job. – Akul Goyal Dec 06 '17 at 11:25
  • Yup that's all described in the docs and in the readme (https://github.com/openzipkin/zipkin/tree/master/zipkin-collector/rabbitmq) – Marcin Grzejszczak Dec 06 '17 at 12:19
  • Yup but I wasn't able to find channel's name (`sleuth`) at zipkin client side in spring docs. – Akul Goyal Dec 06 '17 at 12:44
  • That's a good point. You can file an issue there so that they update the docs – Marcin Grzejszczak Dec 06 '17 at 12:45

1 Answers1

1

I have a client application with multiple channels as SOURCE/SINK. I want to send logs to Zipkin server.

Zipkin is not a tool to store logs

According to my understanding, if spring finds spring cloud stream in classpath, Zipkin client defaults to messaging instead of sending logs through HTTP.

No - you need the sleuth-stream dependency on the client side and the zipkin-stream dependency on the server side (which got deprecated and you should start using the inbuilt rabbitmq support from Zipkin).

At client side: Q1. Is there an automatic configuration for zipkin rabbit binding in such scenario? If not, what is default channel name of zipkin SOURCE channel?

Yes, there is. The channel is sleuth

Q2. Do I need to configure defaultSampler to AlwaysSampler()?

No, you have the PercentageBasedSampler (I'm pretty sure it's written in the docs). You can tweak its values.

At Server side: Q1. Do I need to create Zipkin server as a spring boot application for my use case or can I use the jar retrieved using: wget -O zipkin.jar 'https://search.maven.org/remote_content?g=io.zipkin.java&a=zipkin-server&v=LATEST&c=exec' ...as stated on https://zipkin.io/pages/quickstart.html ?

You should do the wget. If you want to use the legacy stream support then you should create a zipkin server yourself.

Q2. How do I configure zipkin SINK channel to destination?

If you're using the legacy zipkin stream app then it's automatically configured to point to proper destination. You can tweak the destination as you please in the standard way Spring Cloud Stream supports it.

Marcin Grzejszczak
  • 10,624
  • 1
  • 16
  • 32