2

I have 2 spring based applications both of them uses spring-sleuth.

Application-1:

AmazonSNS snsPublisher;
snsPublisher.publish(message)

I would like to add MDC context here somehow, so that application-2 can use the same context. Is there any integration that is provided to achieve this ?

Application-2:

@SqsListener
public void process(String message, @Headers Map<String, MessageAttributeValue> sqsHeaders)

When I receive the MDC context(traceId) set by other application in headers, then I need an integration which can add that same MDC context in application-2 as well. So that, when I look at logs I will have a whole picture of what has happened with that request combining both of these applications.

Sumanth Kumar Mora
  • 637
  • 1
  • 5
  • 15
  • Spring sleuth support this feature out of the box https://github.com/spring-cloud/spring-cloud-sleuth/pull/1218/files – Jorge Tovar Jun 12 '20 at 23:07

0 Answers0