-
Hi, It might be an obvious question, but I am quite new to Otel, so would like to see if I missed anything obvious. I have an application(App A) that sends a JMS message to another application(App B), which receives the message, then it sends the message to another(App C). I have noticed that the context is extracted and linked in App B from the same trace.id of the http request of App A that sends the JMS message. However, when App B sends the JMS message, it does not use the same context as the consumer, so it creates a fresh context. Is there a way to make them still within the same context? Using agent version 1.26 Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hey @kes2464 ,
It really depends how you structure your code. If you send a new JMS message (B->C) from somewhere inside your message listener function (A->B), then the new message should properly inherit the traceId. |
Beta Was this translation helpful? Give feedback.
If you are using
MessageConsumer.receive()
you'll have to manually extract context from the received message and make it active before sending the next message if you want it to be in the same trace as the original message.