From 5e27e7f45921cf88b09684fb8e94fb8e6f056617 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/2.0.x/single/spring-cloud-sleuth.html b/2.0.x/single/spring-cloud-sleuth.html index 8e1d346fd..61af6c1d0 100644 --- a/2.0.x/single/spring-cloud-sleuth.html +++ b/2.0.x/single/spring-cloud-sleuth.html @@ -837,7 +837,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/2.0.x/spring-cloud-sleuth.xml b/2.0.x/spring-cloud-sleuth.xml index 404b4a296..b79f61ad0 100644 --- a/2.0.x/spring-cloud-sleuth.xml +++ b/2.0.x/spring-cloud-sleuth.xml @@ -1772,6 +1772,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