Spring-cloud-sleuth: spring-zipkin support for activemq

Created on 6 Jun 2017  路  12Comments  路  Source: spring-cloud/spring-cloud-sleuth

I was looking for zipkin support for applications communicating over activemq and didn't find.
I've spring boot based producer and consumer application connected via activemq and I wanted to trace request flow from producer->consumer.

Please provide support for activemq like it has been provided via Spring Integration + RabbitMQ

question

Most helpful comment

Could you please provide zipkin support for messaging.

All 12 comments

Currently, there's no support for messaging other than via Spring Integration. You can provide the support manually by passing the org.springframework.cloud.sleuth.instrument.messaging.TraceMessageHeaders headers to / from the message. If there are more users interested in adding support for activemq (please vote for this issue if you are) then we can think about doing that.

OTOH can you explain how you are actually using activemq client in your code?

Could you please provide the zipkin support for activemq ? I am waiting for it for long time.

Could you please provide zipkin support for messaging.

@sfarande how are you using activemq? Which client are you using to send the JMS message?
@nileshgadhave77 we already support context propagation with messaging via Spring Integration / Stream

@marcingrzejszczak I am using JAVA spring boot based client and JMS Template to send & receive messages over Active MQ.

That's not too helpful. Can you show the code that you're executing to do that? Which class exactly? In order to add instrumentation to a library, I need to know which library you're using and how you're doing that.

Just to provide more details here.

  • I've custom library which does task of sending JMS messages using JMS library in java.
  • I wanted to instrument my custom classes (which are "not spring bean") to continue with existing trace over JMS message. So that receiver of JMS messages should get the trace, span and response back to original sender.
  • So in general I wanted to achieve -> CS (from Jms producer application), SR (Jms consumer application), SS (from Jms consumer application when it sends response on queue) and CR (in Jms producer when response is received)

Please guide me here if such support already provided or point me to any example here.
Note: I can not go back and use spring integration/stream here for messaging.

Ok still technically I'm not able to help you much cause I haven't seen the code. You have to wrap your calls in a span, add the proper events at proper moments in time as you've mentioned, also you have to pass the messaging headers with names as presented in this class - https://github.com/spring-cloud/spring-cloud-sleuth/blob/master/spring-cloud-sleuth-core/src/main/java/org/springframework/cloud/sleuth/instrument/messaging/TraceMessageHeaders.java#L29-L35 . I have no idea how your custom library works so it's up to you to set things up in the way you've mentioned.

Ping?

We can close this issue now, as I've instrumented custom JMS related source code by passing Trace information as JMS message header.
@marcingrzejszczak - thanks for all the support here.

Hi Rahul, Could you please share or let me know, whats was the change required to handle the tracing.

@rahul-pharande any example of code ? Github ?

Thx.

Was this page helpful?
0 / 5 - 0 ratings