From 2c233fe79c236e1d6aff28f0431b2559a0a60cbd Mon Sep 17 00:00:00 2001 From: Marcin Grzejszczak Date: Fri, 15 Jul 2016 16:29:14 +0200 Subject: [PATCH] Sync docs from master to gh-pages --- spring-cloud-sleuth.html | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/spring-cloud-sleuth.html b/spring-cloud-sleuth.html index 7941fac52..dda2b4a5c 100644 --- a/spring-cloud-sleuth.html +++ b/spring-cloud-sleuth.html @@ -2110,7 +2110,25 @@ If you create a RestTemplate instance with a new keywo

Custom instrumentation is set to create and close Spans upon sending and receiving requests. You can customize the ClientHttpRequestFactory and the AsyncClientHttpRequestFactory by registering your beans. Remember to use tracing compatible implementations (e.g. don’t forget to -wrap ThreadPoolTaskScheduler in a TraceAsyncListenableTaskExecutor).

+wrap ThreadPoolTaskScheduler in a TraceAsyncListenableTaskExecutor). Example of custom request factories:

+
+
+
+
@EnableAutoConfiguration
+@Configuration
+public static class TestConfiguration {
+
+	@Bean
+	ClientHttpRequestFactory mySyncClientFactory() {
+		return new MySyncClientHttpRequestFactory();
+	}
+
+	@Bean
+	AsyncClientHttpRequestFactory myAsyncClientFactory() {
+		return new MyAsyncClientHttpRequestFactory();
+	}
+}
+

To block the AsyncRestTemplate features set spring.sleuth.web.async.client.enabled to false. @@ -2247,7 +2265,7 @@ To disable Zuul support set the spring.sleuth.zuul.enabled property