Hello,
I am trying to add trace id to my spring-boot microservices for distributed tracing. Given below are the dependencies I have added in pom.xml:
- micrometer-tracing-bridge-brave
- spring-boot-starter-actuator
I have also updated the logback-spring.xml file to display the trace id while logging.
My system consists of three services: Service-1 hits Service-2 (Workflow-Service), which in turn hits Service-3. After adding the dependencies to each of these three services, I could observe that trace id is getting logged in Service-1 and Service-3, but not in Service-2 (Workflow-Service).
My workflow execution is async and apparently trace id won’t be propagated to spawned threads - I faced the same issue while working with a function annotated with @Async, but got it resolved by adding the micrometer-context-propagation dependency and a custom AsyncConfig.
Similarly is there anything that can be done to propagate the trace id to the workflow thread?
Thanks,
Joe