You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Prabhat Kumar <pr...@ascendcorp.com> on 2019/12/03 13:57:21 UTC

Tracing camel-zipkin-starter with Rabbitmq

Hi

I have implemented different microservice where internal communication is
taking place by camel and rabbitMQ with different exchange and queue.

Ex: Service1 Publish message to RabbitMQ ( i.e Exchange 1 -> Queue 1) where
Service2 Consume message
Service2 Publish message to RabbitMQ ( i.e Exchange 2 -> Queue 2) where
Service3 Consume message
Service3 Publish message to RabbitMQ ( i.e Exchange 3 -> Queue 3) where
Service4 Consume message and so on.

I am using camel-zipkin for tracing, and log4j2 for logging.

I am using Springboot :  1.5.12.RELEASE and 2.21.5 version of following
dependencies of camel :

camel-spring-boot-starter

camel-rabbitmq-starter

camel-core

camel-spring

camel-zipkin-starter

camel-test

camel-test-spring


I need suggestion for my two problems

1. span-id, trace-id are not getting printed in logs.  I have necessary
placeholders added in my log4j2.xml.
2. Whenever a message is sent to an exchange a unique span-id and trace-id
is getting generated.

My Questions are :

1. Is it possible to have a unique traceID for entire data traverse from
Service 1 to Service N.
2. How can I print span-id, trace-id to logs.


Attached is log4j2.xml, pom.xml and application.yaml for reference.

Do let me know in case more information is required

Regards
Prabhat Kumar