diff --git a/spring-cloud-sleuth.html b/spring-cloud-sleuth.html index a2ed24c65..9ef339c86 100644 --- a/spring-cloud-sleuth.html +++ b/spring-cloud-sleuth.html @@ -1767,46 +1767,54 @@ are created and propagated.

or HTTP headers), to start or join an existing trace. Trace information is injected into any outbound requests so the next hop can extract them.

+
+

The key change in comparison to the previous versions of Sleuth is that Sleuth is implementing +the Open Tracing’s TextMap notion. In Sleuth it’s called SpanTextMap. Basically the idea +is that any means of communication (e.g. message, http request, etc.) can be abstracted via +a SpanTextMap. This abstraction defines how one can insert data into the carrier and +how to retrieve it from there. Thanks to this if you want to instrument a new HTTP library +that uses a FooRequest as a mean of sending HTTP requests then you have to create an +implementation of a SpanTextMap that delegates calls to FooRequest in terms of retrieval +and insertion of HTTP headers.

+

Spring Integration

-

For Spring Integration these are the beans responsible for creation of a Span from a Message - and filling in the MessageBuilder with tracing information.

-
-
-
-
@Bean
-public SpanExtractor<Message> messagingSpanExtractor() {
-    ...
-}
-
-@Bean
-public SpanInjector<MessageBuilder> messagingSpanInjector() {
-    ...
-}
+

For Spring Integration there are 2 interfaces responsible for creation of a Span from a Message. +These are:

+
+
    +
  • +

    MessagingSpanTextMapExtractor

    +
  • +
  • +

    MessagingSpanTextMapInjector

    +
  • +
-

You can override them by providing your own implementation and by adding a @Primary annotation -to your bean definition.

+

You can override them by providing your own implementation.

HTTP

-

For HTTP these are the beans responsible for creation of a Span from a HttpServletRequest.

-
-
-
-
@Bean
-public SpanExtractor<HttpServletRequest> httpServletRequestSpanExtractor() {
-    ...
-}
+

For HTTP there are 2 interfaces responsible for creation of a Span from a Message. +These are:

+
+
    +
  • +

    HttpSpanExtractor

    +
  • +
  • +

    HttpSpanInjector

    +
  • +
-

You can override them by providing your own implementation and by adding a @Primary annotation -to your bean definition.

+

You can override them by providing your own implementation.