0

I have a problem related to spring microservices distributed tracing. I'm use sleuth library to print trace I'ds. In Java 8, when we use parallelStream it's doesn't work as it is failed to propagate information to other threads. I'm looking for solution to work with it. any thing to propagate values to parralelStream should get close to results. Few points are bellow

  1. Custom logging format with spring boot and slf4j so that I can add more information about service.

  2. Any means to send information with parallelStream, aspectJ and intercepter.

  3. Fix to allow sleuth or brave library to work with parallelStream..

Any suggestions, solution out of above would help.

  • You just need to provide a custom thread pool to the fork join pool that propagates the treadlocal information to the worker threads. Sadly sleuth is not magic. It does have integration with Spring Reactor through - so perhaps you could just switch over. – Boris the Spider Jun 16 '19 at 08:11
  • See this ticket on Sleuth: https://github.com/spring-cloud/spring-cloud-sleuth/issues/744 – Boris the Spider Jun 16 '19 at 08:13

0 Answers0