I am trying to find out ways to add tracing when RabbitMQ consumer consumes message from queue and starts processing.
Here is the flow:
Webhook data received -> gateway server -> inbox-service -> side load the data (send it to RabbitMQ) -> return OK http response.
(Till here we do have trace of what request we received and what was the response of our service).
What I am trying to find is how to trace things that happen when RabbitMQ picks data from queue and starts processing it.
Flow:
Consumer(listener) inside inbox-service picks data from queue -> fetches email content from Microsoft API -> process the data -> store it in DB.
(I want to see all trace / spans for all calls made by inbox-service to our service / external).
We use this dependency “io.projectreactor.netty:reactor-netty”.
How to achieve it?
My solution (not working/less knowledge in tracing) is to pass trace id and span id to rabbitMQ data on listener side extract the message content get trace id and span id construct new span and start it and finish it once the method is executed.(please suggest your solution)