Merge branch 'master' into 2.0.x

This commit is contained in:
Marcin Grzejszczak
2017-08-17 18:42:57 +02:00

View File

@@ -751,6 +751,22 @@ error callbacks takes care of closing client side spans.
IMPORTANT: You have to register `WebClient` as a bean so that the tracing instrumention gets applied.
If you create a `WebClient` instance with a `new` keyword then the instrumentation WILL NOT work.
==== Traverson
If you're using the http://docs.spring.io/spring-hateoas/docs/current/reference/html/#client.traverson[Traverson] library
it's enough for you to inject a `RestTemplate` as a bean into your Traverson object. Since `RestTemplate`
is already intercepted, you will get full support of tracing in your client. Below you can find a pseudo code
of how to do that:
[source,java]
----
@Autowired RestTemplate restTemplate;
Traverson traverson = new Traverson(URI.create("http://some/address"),
MediaType.APPLICATION_JSON, MediaType.APPLICATION_JSON_UTF8).setRestOperations(restTemplate);
// use Traverson
----
=== Feign
By default Spring Cloud Sleuth provides integration with feign via the `TraceFeignClientAutoConfiguration`. You can disable it entirely