From a59c9e1a098acb379106e19b4a687225d47cc80e Mon Sep 17 00:00:00 2001
From: buildmaster
Sometimes you need to set up a custom instance of the AsyncExecutor. In the following snippet you
+ tracer, traceKeys, spanNamer, "calculateTax"));
![]() | Important |
|---|---|
Sleuth doesn’t work with |
Sometimes you need to set up a custom instance of the AsyncExecutor. In the following snippet you
can see an example of how to set up such a custom Executor.
@Configuration @EnableAutoConfiguration @EnableAsync diff --git a/single/spring-cloud-sleuth.html b/single/spring-cloud-sleuth.html index 533ff66dc..bc3b46173 100644 --- a/single/spring-cloud-sleuth.html +++ b/single/spring-cloud-sleuth.html @@ -832,7 +832,9 @@ are creating Spans each time a new task is submitted, invoked or scheduled.< return 1_000_000L; }, new TraceableExecutorService(executorService, // 'calculateTax' explicitly names the span - this param is optional - tracer, traceKeys, spanNamer, "calculateTax"));
Sometimes you need to set up a custom instance of the AsyncExecutor. In the following snippet you
+ tracer, traceKeys, spanNamer, "calculateTax"));
![]() | Important |
|---|---|
Sleuth doesn’t work with |
Sometimes you need to set up a custom instance of the AsyncExecutor. In the following snippet you
can see an example of how to set up such a custom Executor.
@Configuration @EnableAutoConfiguration @EnableAsync diff --git a/spring-cloud-sleuth.xml b/spring-cloud-sleuth.xml index b0c143d73..a07e4e9dc 100644 --- a/spring-cloud-sleuth.xml +++ b/spring-cloud-sleuth.xml @@ -1756,6 +1756,11 @@ are creating Spans each time a new task is submitted, invoked or scheduled. ++ Sleuth doesn’t work with +parallelStream() out of the box. If you want +to have the tracing information propagated through the stream you have to use the +approach withsupplyAsync(...) as presented above.Customization of Executors Sometimes you need to set up a custom instance of the AsyncExecutor . In the following snippet you