Fix headers in messaging (#335)
* Fix headers in messaging with this change the span related headers are changed to be compatible with messaging specs. The change is backwards compatible so we accept the old ones as input, and as output we're producing both new and old headers. fixes #332
This commit is contained in:
@@ -449,6 +449,9 @@ We're injecting a `RestTemplate` interceptor that ensures that all the tracing i
|
||||
call is made a new Span is created. It gets closed upon receiving the response. In order to block the synchronous `RestTemplate` features
|
||||
just set `spring.sleuth.web.client.enabled` to `false`.
|
||||
|
||||
IMPORTANT: You have to register `RestTemplate` as a bean so that the interceptors will get injected.
|
||||
If you create a `RestTemplate` instance with a `new` keyword then the instrumentation WILL NOT work.
|
||||
|
||||
==== Asynchronous Rest Template
|
||||
|
||||
Custom instrumentation is set to create and close Spans upon sending and receiving requests. You can customize the `ClientHttpRequestFactory`
|
||||
@@ -512,6 +515,11 @@ include::../../../../spring-cloud-sleuth-core/src/test/java/org/springframework/
|
||||
Spring Cloud Sleuth integrates with http://projects.spring.io/spring-integration/[Spring Integration]. It creates spans for publish and
|
||||
subscribe events. To disable Spring Integration instrumentation, set `spring.sleuth.integration.enabled` to false.
|
||||
|
||||
Spring Cloud Sleuth up till version 1.0.4 is sending invalid tracing headers when using messaging. Those headers are actually
|
||||
the same as the ones sent in HTTP (they contain a `-`) in its name. For the sake of
|
||||
backwards compatibility in 1.0.4 we've started sending both valid and invalid headers. Please upgrade to 1.0.4 because
|
||||
in Spring Cloud Sleuth 1.1 we will remove the support for the deprecated headers.
|
||||
|
||||
=== Zuul
|
||||
|
||||
We're registering Zuul filters to propagate the tracing information (the request header is enriched with tracing data).
|
||||
|
||||
Reference in New Issue
Block a user