diff --git a/reference/html/README.html b/reference/html/README.html index 42ccc76c6..47795caac 100644 --- a/reference/html/README.html +++ b/reference/html/README.html @@ -126,23 +126,30 @@ $(globalSwitch);
  • 1.2. Log correlation
  • 1.3. Service Dependency Graph
  • 1.4. Request scoped properties (Baggage)
  • -
  • 1.5. Adding Sleuth to the Project
  • -
  • 2. Building +
  • 2. Adding Sleuth to your Project
  • -
  • 3. Contributing +
  • 3. Building +
  • +
  • 4. Contributing +
  • @@ -185,7 +192,7 @@ fields (baggage) are sent, and which libraries are traced.

    Quick Start

    Add sleuth to the classpath of a Spring Boot application -(see “Adding Sleuth to the Project” for Maven and Gradle examples), and you will +(see “Adding Sleuth to your Project” for Maven and Gradle examples), and you will see trace IDs in logs.

    @@ -623,8 +630,11 @@ like so:

    -
    -

    1.5. Adding Sleuth to the Project

    +
    + +
    +

    2. Adding Sleuth to your Project

    +

    This section addresses how to add Sleuth to your project with either Maven or Gradle.

    @@ -640,8 +650,8 @@ To ensure that your application name is properly displayed in Zipkin, set the
    -
    -

    1.5.1. Sleuth with Zipkin via HTTP

    +
    +

    2.1. Sleuth with Zipkin via HTTP

    If you want both Sleuth and Zipkin, add the spring-cloud-starter-zipkin dependency.

    @@ -711,8 +721,8 @@ dependencies { (2)
    -
    -

    1.5.2. Sleuth with Zipkin over RabbitMQ or Kafka

    +
    +

    2.2. Sleuth with Zipkin over RabbitMQ or Kafka

    If you want to use RabbitMQ or Kafka instead of HTTP, add the spring-rabbit or spring-kafka dependency. The default destination name is zipkin.

    @@ -817,8 +827,8 @@ dependencies {
    -
    -

    1.5.3. Overriding the auto-configuration of Zipkin

    +
    +

    2.3. Overriding the auto-configuration of Zipkin

    Spring Cloud Sleuth supports sending traces to multiple tracing systems as of version 2.1.0. In order to get this to work, every tracing system needs to have a Reporter<Span> and Sender. @@ -875,8 +885,8 @@ protected static class MyConfig {

    -
    -

    1.5.4. Only Sleuth (log correlation)

    +
    +

    2.4. Only Sleuth (log correlation)

    If you want to use only Spring Cloud Sleuth without the Zipkin integration, add the spring-cloud-starter-sleuth module to your project.

    @@ -948,12 +958,11 @@ dependencies { (2)
    -
    -

    2. Building

    +

    3. Building

    -

    2.1. Basic Compile and Test

    +

    3.1. Basic Compile and Test

    To build the source you will need to install JDK 1.7.

    @@ -1031,7 +1040,7 @@ If all else fails, build with the command from .travis.yml (usually
    -

    2.2. Documentation

    +

    3.2. Documentation

    The spring-cloud-build module has a "docs" profile, and if you switch that on it will try to build asciidoc sources from @@ -1044,7 +1053,7 @@ a modified file in the correct place. Just commit it and push the change.

    -

    2.3. Working with the code

    +

    3.3. Working with the code

    If you don’t have an IDE preference we would recommend that you use Spring Tools Suite or @@ -1053,7 +1062,7 @@ a modified file in the correct place. Just commit it and push the change.

    should also work without issue as long as they use Maven 3.3.3 or better.

    -

    2.3.1. Importing into eclipse with m2eclipse

    +

    3.3.1. Importing into eclipse with m2eclipse

    We recommend the m2eclipse eclipse plugin when working with eclipse. If you don’t already have m2eclipse installed it is available from the "eclipse @@ -1080,7 +1089,7 @@ pom into your settings.xml.

    -

    2.3.2. Importing into eclipse without m2eclipse

    +

    3.3.2. Importing into eclipse without m2eclipse

    If you prefer not to use m2eclipse you can generate eclipse project metadata using the following command:

    @@ -1114,7 +1123,7 @@ so, your app breaks during the Maven build.
    -

    3. Contributing

    +

    4. Contributing

    Spring Cloud is released under the non-restrictive Apache 2.0 license, @@ -1124,7 +1133,7 @@ to contribute even something trivial please do not hesitate, but follow the guidelines below.

    -

    3.1. Sign the Contributor License Agreement

    +

    4.1. Sign the Contributor License Agreement

    Before we accept a non-trivial patch or pull request we will need you to sign the Contributor License Agreement. @@ -1135,7 +1144,7 @@ given the ability to merge pull requests.

    -

    3.2. Code of Conduct

    +

    4.2. Code of Conduct

    This project adheres to the Contributor Covenant code of conduct. By participating, you are expected to uphold this code. Please report @@ -1143,7 +1152,7 @@ unacceptable behavior to spri

    -

    3.3. Code Conventions and Housekeeping

    +

    4.3. Code Conventions and Housekeeping

    None of these is essential for a pull request, but they will all help. They can also be added after the original pull request but before a merge.

    @@ -1191,7 +1200,7 @@ message (where XXXX is the issue number).

    -

    3.4. Checkstyle

    +

    4.4. Checkstyle

    Spring Cloud Build comes with a set of checkstyle rules. You can find them in the spring-cloud-build-tools module. The most notable files under the module are:

    @@ -1224,7 +1233,7 @@ message (where XXXX is the issue number).

    -

    3.4.1. Checkstyle configuration

    +

    4.4.1. Checkstyle configuration

    Checkstyle rules are disabled by default. To add checkstyle to your project just define the following properties and plugins.

    @@ -1314,9 +1323,9 @@ $ touch .springformat
    -

    3.5. IDE setup

    +

    4.5. IDE setup

    -

    3.5.1. Intellij IDEA

    +

    4.5.1. Intellij IDEA

    In order to setup Intellij you should import our coding conventions, inspection profiles and set up the checkstyle plugin. The following files can be found in the Spring Cloud Build project.

    diff --git a/reference/html/index.html b/reference/html/index.html index 034fba49e..c2dc4e2ba 100644 --- a/reference/html/index.html +++ b/reference/html/index.html @@ -126,74 +126,81 @@ $(globalSwitch);
  • 2.2. Log correlation
  • 2.3. Service Dependency Graph
  • 2.4. Request scoped properties (Baggage)
  • -
  • 2.5. Adding Sleuth to the Project
  • -
  • 3. How Sleuth works +
  • 3. Adding Sleuth to your Project
  • -
  • 4. Sampling
  • -
  • 5. Baggage +
  • 4. How Sleuth works
  • -
  • 6. Instrumentation
  • -
  • 7. Span lifecycle +
  • 5. Sampling
  • +
  • 6. Baggage
  • -
  • 8. Naming spans +
  • 7. Instrumentation
  • +
  • 8. Span lifecycle
  • -
  • 9. Managing Spans with Annotations +
  • 9. Naming spans
  • -
  • 10. Customizations +
  • 10. Managing Spans with Annotations
  • -
  • 11. Sending Spans to Zipkin
  • -
  • 12. Zipkin Stream Span Consumer
  • -
  • 13. Integrations +
  • 11. Customizations
  • -
  • 14. Configuration properties
  • -
  • 15. Running examples
  • +
  • 12. Sending Spans to Zipkin
  • +
  • 13. Zipkin Stream Span Consumer
  • +
  • 14. Integrations + +
  • +
  • 15. Configuration properties
  • +
  • 16. Running examples
  • @@ -589,8 +596,11 @@ like so:

    -
    -

    2.5. Adding Sleuth to the Project

    +
    +
    +
    +

    3. Adding Sleuth to your Project

    +

    This section addresses how to add Sleuth to your project with either Maven or Gradle.

    @@ -606,8 +616,8 @@ To ensure that your application name is properly displayed in Zipkin, set the
    -
    -

    2.5.1. Sleuth with Zipkin via HTTP

    +
    +

    3.1. Sleuth with Zipkin via HTTP

    If you want both Sleuth and Zipkin, add the spring-cloud-starter-zipkin dependency.

    @@ -677,8 +687,8 @@ dependencies { (2)
    -
    -

    2.5.2. Sleuth with Zipkin over RabbitMQ or Kafka

    +
    +

    3.2. Sleuth with Zipkin over RabbitMQ or Kafka

    If you want to use RabbitMQ or Kafka instead of HTTP, add the spring-rabbit or spring-kafka dependency. The default destination name is zipkin.

    @@ -783,8 +793,8 @@ dependencies {
    -
    -

    2.5.3. Overriding the auto-configuration of Zipkin

    +
    +

    3.3. Overriding the auto-configuration of Zipkin

    Spring Cloud Sleuth supports sending traces to multiple tracing systems as of version 2.1.0. In order to get this to work, every tracing system needs to have a Reporter<Span> and Sender. @@ -841,8 +851,8 @@ protected static class MyConfig {

    -
    -

    2.5.4. Only Sleuth (log correlation)

    +
    +

    3.4. Only Sleuth (log correlation)

    If you want to use only Spring Cloud Sleuth without the Zipkin integration, add the spring-cloud-starter-sleuth module to your project.

    @@ -914,9 +924,8 @@ dependencies { (2)
    -
    -

    3. How Sleuth works

    +

    4. How Sleuth works

    Spring Cloud Sleuth is a layer over Brave.

    @@ -957,7 +966,7 @@ looking for in the documentation, ask -

    3.1. Brave Basics

    +

    4.1. Brave Basics

    Most instrumentation work is done for you by default. Sleuth provides beans to allow you to change what’s traced, and it even provides annotations to avoid @@ -982,7 +991,7 @@ are some pointers.

    -

    4. Sampling

    +

    5. Sampling

    By default Spring Cloud Sleuth doesn’t sample spans. @@ -1033,7 +1042,7 @@ Doing so forces the current request to be sampled regardless of configuration.

    -

    5. Baggage

    +

    6. Baggage

    Baggage are fields that are propagated with the trace, optionally out of process. You can use @@ -1078,7 +1087,7 @@ Remember that adding entries to MDC can drastically decrease the performance of spring.sleuth.baggage.tag-fields with a list of whitelisted baggage keys. To disable the feature you have to pass the spring.sleuth.propagation.tag.enabled=false property.

    -

    5.1. Java configuration

    +

    6.1. Java configuration

    If you need to do anything more advanced than above, do not define properties and instead use a @Bean config for the baggage fields you use. @@ -1091,7 +1100,7 @@ Remember that adding entries to MDC can drastically decrease the performance of

    -

    6. Instrumentation

    +

    7. Instrumentation

    Spring Cloud Sleuth automatically instruments all your Spring applications, so you should not have to do anything to activate it. @@ -1117,7 +1126,7 @@ Tags are collected and exported only if there is a Sampler that all

    -

    7. Span lifecycle

    +

    8. Span lifecycle

    You can do the following operations on the Span by means of brave.Tracer:

    @@ -1156,7 +1165,7 @@ Spring Cloud Sleuth creates an instance of Tracer for you. In order
    -

    7.1. Creating and finishing spans

    +

    8.1. Creating and finishing spans

    You can manually create spans by using the Tracer, as shown in the following example:

    @@ -1211,7 +1220,7 @@ Your names have to be explicit and concrete. Big names lead to latency issues an
    -

    7.2. Continuing Spans

    +

    8.2. Continuing Spans

    Sometimes, you do not want to create a new span but you want to continue one. An example of such a situation might be as follows:

    @@ -1248,7 +1257,7 @@ finally {
    -

    7.3. Creating a Span with an explicit Parent

    +

    8.3. Creating a Span with an explicit Parent

    You might want to start a new span and provide an explicit parent of that span. Assume that the parent of a span is in one thread and you want to start a new span in another thread. @@ -1296,7 +1305,7 @@ After creating such a span, you must finish it. Otherwise it is not reported (fo

    -

    8. Naming spans

    +

    9. Naming spans

    Picking a span name is not a trivial task. A span name should depict an operation name. @@ -1322,7 +1331,7 @@ The name should be low cardinality, so it should not include identifiers.

    Fortunately, for asynchronous processing, you can provide explicit naming.

    -

    8.1. @SpanName Annotation

    +

    9.1. @SpanName Annotation

    You can name the span explicitly by using the @SpanName annotation, as shown in the following example:

    @@ -1353,7 +1362,7 @@ future.get();
    -

    8.2. toString() method

    +

    9.2. toString() method

    It is pretty rare to create separate classes for Runnable or Callable. Typically, one creates an anonymous instance of those classes. @@ -1385,13 +1394,13 @@ future.get();

    -

    9. Managing Spans with Annotations

    +

    10. Managing Spans with Annotations

    You can manage spans with a variety of annotations.

    -

    9.1. Rationale

    +

    10.1. Rationale

    There are a number of good reasons to manage spans with annotations, including:

    @@ -1414,7 +1423,7 @@ Now you can provide annotations over interfaces and the arguments of those inter
    -

    9.2. Creating New Spans

    +

    10.2. Creating New Spans

    If you do not want to create local spans manually, you can use the @NewSpan annotation. Also, we provide the @SpanTag annotation to add tags in an automated fashion.

    @@ -1470,7 +1479,7 @@ concrete one wins (in this case customNameOnTestMethod3 is set).

    -

    9.3. Continuing Spans

    +

    10.3. Continuing Spans

    If you want to add tags and annotations to an existing span, you can use the @ContinueSpan annotation, as shown in the following example:

    @@ -1506,7 +1515,7 @@ this.testBean.testMethod13();
    -

    9.4. Advanced Tag Setting

    +

    10.4. Advanced Tag Setting

    There are 3 different ways to add tags to a span. All of them are controlled by the SpanTag annotation. The precedence is as follows:

    @@ -1528,7 +1537,7 @@ The default implementation uses SPEL expression resolution.
    -

    9.4.1. Custom extractor

    +

    10.4.1. Custom extractor

    The value of the tag for the following method is computed by an implementation of TagValueResolver interface. Its class name has to be passed as the value of the resolver attribute.

    @@ -1560,7 +1569,7 @@ public TagValueResolver tagValueResolver() {
    -

    9.4.2. Resolving Expressions for a Value

    +

    10.4.2. Resolving Expressions for a Value

    Consider the following annotated method:

    @@ -1578,7 +1587,7 @@ If you want to use some other expression resolution mechanism, you can create yo
    -

    9.4.3. Using the toString() method

    +

    10.4.3. Using the toString() method

    Consider the following annotated method:

    @@ -1597,7 +1606,7 @@ public void getAnnotationForArgumentToString(@SpanTag("test") Long param) {
    -

    10. Customizations

    +

    11. Customizations

    The Tracer object is fully managed by sleuth, so you rarely need to affect it. That said, @@ -1631,9 +1640,9 @@ customize behaviour:

    -

    10.1. HTTP

    +

    11.1. HTTP

    -

    10.1.1. Data Policy

    +

    11.1.1. Data Policy

    The default span data policy for HTTP requests is described in Brave: github.com/openzipkin/brave/tree/master/instrumentation/http#span-data-policy

    @@ -1675,7 +1684,7 @@ class Config {
    -

    10.1.2. Sampling

    +

    11.1.2. Sampling

    If client /server sampling is required, just register a bean of type brave.sampler.SamplerFunction<HttpRequest> and name the bean @@ -1718,7 +1727,7 @@ class Config {

    -

    10.2. TracingFilter

    +

    11.2. TracingFilter

    You can also modify the behavior of the TracingFilter, which is the component that is responsible for processing the input HTTP request and adding tags basing on the HTTP response. You can customize the tags or modify the response headers by registering your own instance of the TracingFilter bean.

    @@ -1759,7 +1768,7 @@ class MyFilter extends GenericFilterBean {
    -

    10.3. Messaging

    +

    11.3. Messaging

    Sleuth automatically configures the MessagingTracing bean which serves as a foundation for Messaging instrumentation such as Kafka or JMS.

    @@ -1792,7 +1801,7 @@ class Config {
    -

    10.4. RPC

    +

    11.4. RPC

    Sleuth automatically configures the RpcTracing bean which serves as a foundation for RPC instrumentation such as gRPC or Dubbo.

    @@ -1833,7 +1842,7 @@ class Config {
    -

    10.5. Custom service name

    +

    11.5. Custom service name

    By default, Sleuth assumes that, when you send a span to Zipkin, you want the span’s service name to be equal to the value of the spring.application.name property. That is not always the case, though. @@ -1847,7 +1856,7 @@ To achieve that, you can pass the following property to your application to over

    -

    10.6. Customization of Reported Spans

    +

    11.6. Customization of Reported Spans

    Before reporting spans (for example, to Zipkin) you may want to modify that span in some way. You can do so by using the FinishedSpanHandler interface.

    @@ -1890,7 +1899,7 @@ FinishedSpanHandler handlerTwo() {
    -

    10.7. Host Locator

    +

    11.7. Host Locator

    @@ -1921,7 +1930,7 @@ If those are not set, we try to retrieve the host name from the network interfac
    -

    11. Sending Spans to Zipkin

    +

    12. Sending Spans to Zipkin

    By default, if you add spring-cloud-starter-zipkin as a dependency to your project, when the span is closed, it is sent to Zipkin over HTTP. @@ -2002,7 +2011,7 @@ object, you will have to create a bean of zipkin2.reporter.Sender t

    @@ -2024,10 +2033,10 @@ In the Finchley release, it got removed.
    -

    13. Integrations

    +

    14. Integrations

    -

    13.1. OpenTracing

    +

    14.1. OpenTracing

    Spring Cloud Sleuth is compatible with OpenTracing. If you have OpenTracing on the classpath, we automatically register the OpenTracing Tracer bean. @@ -2035,7 +2044,7 @@ If you wish to disable this, set spring.sleuth.opentracing.enabled

    -

    13.2. Runnable and Callable

    +

    14.2. Runnable and Callable

    If you wrap your logic in Runnable or Callable, you can wrap those classes in their Sleuth representative, as shown in the following example for Runnable:

    @@ -2091,13 +2100,13 @@ Callable<String> traceCallableFromTracer = this.tracing.currentTraceContex
    -

    13.3. Spring Cloud CircuitBreaker

    +

    14.3. Spring Cloud CircuitBreaker

    If you have Spring Cloud CircuitBreaker on the classpath, we will wrap the passed command Supplier and the fallback Function in its trace representations. In order to disable this instrumentation set spring.sleuth.circuitbreaker.enabled to false.

    -

    13.4. RxJava

    +

    14.4. RxJava

    We registering a custom RxJavaSchedulersHook that wraps all Action0 instances in their Sleuth representative, which is called TraceAction. The hook either starts or continues a span, depending on whether tracing was already going on before the Action was scheduled. @@ -2122,12 +2131,12 @@ the Reactor support.

    -

    13.5. HTTP integration

    +

    14.5. HTTP integration

    Features from this section can be disabled by setting the spring.sleuth.web.enabled property with value equal to false.

    -

    13.5.1. HTTP Filter

    +

    14.5.1. HTTP Filter

    Through the TracingFilter, all sampled incoming requests result in creation of a Span. That Span’s name is http: + the path to which the request was sent. @@ -2151,7 +2160,7 @@ to true.

    -

    13.5.2. HandlerInterceptor

    +

    14.5.2. HandlerInterceptor

    Since we want the span names to be precise, we use a TraceHandlerInterceptor that either wraps an existing HandlerInterceptor or is added directly to the list of existing HandlerInterceptors. The TraceHandlerInterceptor adds a special request attribute to the given HttpServletRequest. @@ -2161,13 +2170,13 @@ In that case, please file an issue in Spring Cloud Sleuth.

    -

    13.5.3. Async Servlet support

    +

    14.5.3. Async Servlet support

    If your controller returns a Callable or a WebAsyncTask, Spring Cloud Sleuth continues the existing span instead of creating a new one.

    -

    13.5.4. WebFlux support

    +

    14.5.4. WebFlux support

    Through TraceWebFilter, all sampled incoming requests result in creation of a Span. That Span’s name is http: + the path to which the request was sent. @@ -2182,7 +2191,7 @@ If you want to reuse Sleuth’s default skip patterns and append your own, p

    -

    13.5.5. Dubbo RPC support

    +

    14.5.5. Dubbo RPC support

    Via the integration with Brave, Spring Cloud Sleuth supports Dubbo. It’s enough to add the brave-instrumentation-dubbo dependency:

    @@ -2211,9 +2220,9 @@ An example of Spring Cloud Sleuth and Dubbo can be found -

    13.6. HTTP Client Integration

    +

    14.6. HTTP Client Integration

    -

    13.6.1. Synchronous Rest Template

    +

    14.6.1. Synchronous Rest Template

    We inject a RestTemplate interceptor to ensure that all the tracing information is passed to the requests. Each time a call is made, a new Span is created. @@ -2235,7 +2244,7 @@ If you create a RestTemplate instance with a new keywo

    @@ -2292,7 +2301,7 @@ static class Config {
    -

    13.6.3. WebClient

    +

    14.6.3. WebClient

    We inject a ExchangeFilterFunction implementation that creates a span and, through on-success and on-error callbacks, takes care of closing client-side spans.

    @@ -2314,7 +2323,7 @@ If you create a WebClient instance with a new keyword,
    -

    13.6.4. Traverson

    +

    14.6.4. Traverson

    If you use the Traverson library, you can inject a RestTemplate as a bean into your Traverson object. Since RestTemplate is already intercepted, you get full support for tracing in your client. The following pseudo code @@ -2331,7 +2340,7 @@ Traverson traverson = new Traverson(URI.create("https://some/address"),

    -

    13.6.5. Apache HttpClientBuilder and HttpAsyncClientBuilder

    +

    14.6.5. Apache HttpClientBuilder and HttpAsyncClientBuilder

    We instrument the HttpClientBuilder and HttpAsyncClientBuilder so that tracing context gets injected to the sent requests.

    @@ -2341,7 +2350,7 @@ tracing context gets injected to the sent requests.

    -

    13.6.6. Netty HttpClient

    +

    14.6.6. Netty HttpClient

    We instrument the Netty’s HttpClient.

    @@ -2363,7 +2372,7 @@ If you create a HttpClient instance with a new keyword
    -

    13.6.7. UserInfoRestTemplateCustomizer

    +

    14.6.7. UserInfoRestTemplateCustomizer

    We instrument the Spring Security’s UserInfoRestTemplateCustomizer.

    @@ -2373,7 +2382,7 @@ If you create a HttpClient instance with a new keyword
    -

    13.7. Feign

    +

    14.7. Feign

    By default, Spring Cloud Sleuth provides integration with Feign through TraceFeignClientAutoConfiguration. You can disable it entirely by setting spring.sleuth.feign.enabled to false. @@ -2387,12 +2396,12 @@ However, all the default instrumentation is still there.

    -

    13.8. gRPC

    +

    14.8. gRPC

    Spring Cloud Sleuth provides instrumentation for gRPC through TraceGrpcAutoConfiguration. You can disable it entirely by setting spring.sleuth.grpc.enabled to false.

    -

    13.8.1. Variant 1

    +

    14.8.1. Variant 1

    Dependencies
    @@ -2461,16 +2470,16 @@ Spring Cloud Sleuth provides a SpringAwareManagedChannelBuilder tha
    -

    13.8.2. Variant 2

    +

    14.8.2. Variant 2

    Grpc Spring Boot Starter automatically detects the presence of Spring Cloud Sleuth and brave’s instrumentation for gRPC and registers the necessary client and/or server tooling.

    -

    13.9. Asynchronous Communication

    +

    14.9. Asynchronous Communication

    -

    13.9.1. @Async Annotated methods

    +

    14.9.1. @Async Annotated methods

    In Spring Cloud Sleuth, we instrument async-related components so that the tracing information is passed between threads. You can disable this behavior by setting the value of spring.sleuth.async.enabled to false.

    @@ -2493,7 +2502,7 @@ You can disable this behavior by setting the value of spring.sleuth.async.
    -

    13.9.2. @Scheduled Annotated Methods

    +

    14.9.2. @Scheduled Annotated Methods

    In Spring Cloud Sleuth, we instrument scheduled method execution so that the tracing information is passed between threads. You can disable this behavior by setting the value of spring.sleuth.scheduled.enabled to false.

    @@ -2516,7 +2525,7 @@ You can disable this behavior by setting the value of spring.sleuth.schedu
    -

    13.9.3. Executor, ExecutorService, and ScheduledExecutorService

    +

    14.9.3. Executor, ExecutorService, and ScheduledExecutorService

    We provide LazyTraceExecutor, TraceableExecutorService, and TraceableScheduledExecutorService. Those implementations create spans each time a new task is submitted, invoked, or scheduled.

    @@ -2603,12 +2612,12 @@ to add the @Role(BeanDefinition.ROLE_INFRASTRUCTURE) on your
    -

    13.10. Messaging

    +

    14.10. Messaging

    Features from this section can be disabled by setting the spring.sleuth.messaging.enabled property with value equal to false.

    -

    13.10.1. Spring Integration and Spring Cloud Stream

    +

    14.10.1. Spring Integration and Spring Cloud Stream

    Spring Cloud Sleuth integrates with Spring Integration. It creates spans for publish and subscribe events. @@ -2647,7 +2656,7 @@ it’s enough for you to register beans of types:

    -

    13.10.2. Spring RabbitMq

    +

    14.10.2. Spring RabbitMq

    We instrument the RabbitTemplate so that tracing headers get injected into the message.

    @@ -2657,7 +2666,7 @@ into the message.

    -

    13.10.3. Spring Kafka

    +

    14.10.3. Spring Kafka

    We instrument the Spring Kafka’s ProducerFactory and ConsumerFactory so that tracing headers get injected into the created Spring Kafka’s @@ -2668,7 +2677,7 @@ so that tracing headers get injected into the created Spring Kafka’s

    -

    13.10.4. Spring Kafka Streams

    +

    14.10.4. Spring Kafka Streams

    We instrument the KafkaStreams KafkaClientSupplier so that tracing headers get injected into the Producer and Consumer`s. A `KafkaStreamsTracing bean @@ -2680,7 +2689,7 @@ allows for further instrumentation through additional TransformerSupplier<

    -

    13.10.5. Spring JMS

    +

    14.10.5. Spring JMS

    We instrument the JmsTemplate so that tracing headers get injected into the message. We also support @JmsListener annotated methods on the consumer side.

    @@ -2702,7 +2711,7 @@ We don’t support baggage propagation for JMS
    -

    13.10.6. Spring Cloud AWS Messaging SQS

    +

    14.10.6. Spring Cloud AWS Messaging SQS

    We instrument @SqsListener which is provided by org.springframework.cloud:spring-cloud-aws-messaging so that tracing headers get extracted from the message and a trace gets put into the context.

    @@ -2713,14 +2722,14 @@ so that tracing headers get extracted from the message and a trace gets put into
    -

    13.11. Redis

    +

    14.11. Redis

    We set tracing property to Lettcue ClientResources instance to enable Brave tracing built in Lettuce . To disable Redis support, set the spring.sleuth.redis.enabled property to false.

    -

    13.12. Quartz

    +

    14.12. Quartz

    We instrument quartz jobs by adding Job/Trigger listeners to the Quartz Scheduler.

    @@ -2729,7 +2738,7 @@ To disable Redis support, set the spring.sleuth.redis.enabled prope
    -

    13.13. Project Reactor

    +

    14.13. Project Reactor

    For projects depending on Project Reactor such as Spring Cloud Gateway, we suggest turning the spring.sleuth.reactor.decorate-on-each option to false. That way an increased performance gain should be observed in comparison to the standard instrumentation mechanism. What this option does is it will wrap decorate onLast operator instead of onEach which will result in creation of far fewer objects. The downside of this is that when Project Reactor will change threads, the trace propagation will continue without issues, however anything relying on the ThreadLocal such as e.g. MDC entries can be buggy.

    @@ -2737,7 +2746,7 @@ To disable Redis support, set the spring.sleuth.redis.enabled prope
    -

    14. Configuration properties

    +

    15. Configuration properties

    To see the list of all Sleuth related configuration properties please check the Appendix page.

    @@ -2745,7 +2754,7 @@ To disable Redis support, set the spring.sleuth.redis.enabled prope
    -

    15. Running examples

    +

    16. Running examples

    You can see the running examples deployed in the Pivotal Web Services. diff --git a/reference/html/setup.html b/reference/html/setup.html index c3d6989ea..437c7ce4c 100644 --- a/reference/html/setup.html +++ b/reference/html/setup.html @@ -5,7 +5,7 @@ -Adding Sleuth to the Project +Adding Sleuth to your Project @@ -113,14 +113,22 @@ $(globalSwitch);

    -
    -

    Adding Sleuth to the Project

    +
    +

    Adding Sleuth to your Project

    +

    This section addresses how to add Sleuth to your project with either Maven or Gradle.

    @@ -136,8 +144,8 @@ To ensure that your application name is properly displayed in Zipkin, set the
    -
    -

    Sleuth with Zipkin via HTTP

    +
    +

    Sleuth with Zipkin via HTTP

    If you want both Sleuth and Zipkin, add the spring-cloud-starter-zipkin dependency.

    @@ -207,8 +215,8 @@ dependencies { (2)
    -
    -

    Sleuth with Zipkin over RabbitMQ or Kafka

    +
    +

    Sleuth with Zipkin over RabbitMQ or Kafka

    If you want to use RabbitMQ or Kafka instead of HTTP, add the spring-rabbit or spring-kafka dependency. The default destination name is zipkin.

    @@ -313,8 +321,8 @@ dependencies {
    -
    -

    Overriding the auto-configuration of Zipkin

    +
    +

    Overriding the auto-configuration of Zipkin

    Spring Cloud Sleuth supports sending traces to multiple tracing systems as of version 2.1.0. In order to get this to work, every tracing system needs to have a Reporter<Span> and Sender. @@ -371,8 +379,8 @@ protected static class MyConfig {

    -
    -

    Only Sleuth (log correlation)

    +
    +

    Only Sleuth (log correlation)

    If you want to use only Spring Cloud Sleuth without the Zipkin integration, add the spring-cloud-starter-sleuth module to your project.

    @@ -444,6 +452,7 @@ dependencies { (2)
    +
    diff --git a/reference/html/spring-cloud-sleuth.html b/reference/html/spring-cloud-sleuth.html index 034fba49e..c2dc4e2ba 100644 --- a/reference/html/spring-cloud-sleuth.html +++ b/reference/html/spring-cloud-sleuth.html @@ -126,74 +126,81 @@ $(globalSwitch);
  • 2.2. Log correlation
  • 2.3. Service Dependency Graph
  • 2.4. Request scoped properties (Baggage)
  • -
  • 2.5. Adding Sleuth to the Project
  • -
  • 3. How Sleuth works +
  • 3. Adding Sleuth to your Project
  • -
  • 4. Sampling
  • -
  • 5. Baggage +
  • 4. How Sleuth works
  • -
  • 6. Instrumentation
  • -
  • 7. Span lifecycle +
  • 5. Sampling
  • +
  • 6. Baggage
  • -
  • 8. Naming spans +
  • 7. Instrumentation
  • +
  • 8. Span lifecycle
  • -
  • 9. Managing Spans with Annotations +
  • 9. Naming spans
  • -
  • 10. Customizations +
  • 10. Managing Spans with Annotations
  • -
  • 11. Sending Spans to Zipkin
  • -
  • 12. Zipkin Stream Span Consumer
  • -
  • 13. Integrations +
  • 11. Customizations
  • -
  • 14. Configuration properties
  • -
  • 15. Running examples
  • +
  • 12. Sending Spans to Zipkin
  • +
  • 13. Zipkin Stream Span Consumer
  • +
  • 14. Integrations + +
  • +
  • 15. Configuration properties
  • +
  • 16. Running examples
  • @@ -589,8 +596,11 @@ like so:

    - +
    +
    +

    3. Adding Sleuth to your Project

    +

    This section addresses how to add Sleuth to your project with either Maven or Gradle.

    @@ -606,8 +616,8 @@ To ensure that your application name is properly displayed in Zipkin, set the
    -
    -

    2.5.1. Sleuth with Zipkin via HTTP

    +
    +

    3.1. Sleuth with Zipkin via HTTP

    If you want both Sleuth and Zipkin, add the spring-cloud-starter-zipkin dependency.

    @@ -677,8 +687,8 @@ dependencies { (2)
    -
    -

    2.5.2. Sleuth with Zipkin over RabbitMQ or Kafka

    +
    +

    3.2. Sleuth with Zipkin over RabbitMQ or Kafka

    If you want to use RabbitMQ or Kafka instead of HTTP, add the spring-rabbit or spring-kafka dependency. The default destination name is zipkin.

    @@ -783,8 +793,8 @@ dependencies {
    -
    -

    2.5.3. Overriding the auto-configuration of Zipkin

    +
    +

    3.3. Overriding the auto-configuration of Zipkin

    Spring Cloud Sleuth supports sending traces to multiple tracing systems as of version 2.1.0. In order to get this to work, every tracing system needs to have a Reporter<Span> and Sender. @@ -841,8 +851,8 @@ protected static class MyConfig {

    -
    -

    2.5.4. Only Sleuth (log correlation)

    +
    +

    3.4. Only Sleuth (log correlation)

    If you want to use only Spring Cloud Sleuth without the Zipkin integration, add the spring-cloud-starter-sleuth module to your project.

    @@ -914,9 +924,8 @@ dependencies { (2)
    -
    -

    3. How Sleuth works

    +

    4. How Sleuth works

    Spring Cloud Sleuth is a layer over Brave.

    @@ -957,7 +966,7 @@ looking for in the documentation, ask -

    3.1. Brave Basics

    +

    4.1. Brave Basics

    Most instrumentation work is done for you by default. Sleuth provides beans to allow you to change what’s traced, and it even provides annotations to avoid @@ -982,7 +991,7 @@ are some pointers.

    -

    4. Sampling

    +

    5. Sampling

    By default Spring Cloud Sleuth doesn’t sample spans. @@ -1033,7 +1042,7 @@ Doing so forces the current request to be sampled regardless of configuration.

    -

    5. Baggage

    +

    6. Baggage

    Baggage are fields that are propagated with the trace, optionally out of process. You can use @@ -1078,7 +1087,7 @@ Remember that adding entries to MDC can drastically decrease the performance of spring.sleuth.baggage.tag-fields with a list of whitelisted baggage keys. To disable the feature you have to pass the spring.sleuth.propagation.tag.enabled=false property.

    -

    5.1. Java configuration

    +

    6.1. Java configuration

    If you need to do anything more advanced than above, do not define properties and instead use a @Bean config for the baggage fields you use. @@ -1091,7 +1100,7 @@ Remember that adding entries to MDC can drastically decrease the performance of

    -

    6. Instrumentation

    +

    7. Instrumentation

    Spring Cloud Sleuth automatically instruments all your Spring applications, so you should not have to do anything to activate it. @@ -1117,7 +1126,7 @@ Tags are collected and exported only if there is a Sampler that all

    -

    7. Span lifecycle

    +

    8. Span lifecycle

    You can do the following operations on the Span by means of brave.Tracer:

    @@ -1156,7 +1165,7 @@ Spring Cloud Sleuth creates an instance of Tracer for you. In order
    -

    7.1. Creating and finishing spans

    +

    8.1. Creating and finishing spans

    You can manually create spans by using the Tracer, as shown in the following example:

    @@ -1211,7 +1220,7 @@ Your names have to be explicit and concrete. Big names lead to latency issues an
    -

    7.2. Continuing Spans

    +

    8.2. Continuing Spans

    Sometimes, you do not want to create a new span but you want to continue one. An example of such a situation might be as follows:

    @@ -1248,7 +1257,7 @@ finally {
    -

    7.3. Creating a Span with an explicit Parent

    +

    8.3. Creating a Span with an explicit Parent

    You might want to start a new span and provide an explicit parent of that span. Assume that the parent of a span is in one thread and you want to start a new span in another thread. @@ -1296,7 +1305,7 @@ After creating such a span, you must finish it. Otherwise it is not reported (fo

    -

    8. Naming spans

    +

    9. Naming spans

    Picking a span name is not a trivial task. A span name should depict an operation name. @@ -1322,7 +1331,7 @@ The name should be low cardinality, so it should not include identifiers.

    Fortunately, for asynchronous processing, you can provide explicit naming.

    -

    8.1. @SpanName Annotation

    +

    9.1. @SpanName Annotation

    You can name the span explicitly by using the @SpanName annotation, as shown in the following example:

    @@ -1353,7 +1362,7 @@ future.get();
    -

    8.2. toString() method

    +

    9.2. toString() method

    It is pretty rare to create separate classes for Runnable or Callable. Typically, one creates an anonymous instance of those classes. @@ -1385,13 +1394,13 @@ future.get();

    -

    9. Managing Spans with Annotations

    +

    10. Managing Spans with Annotations

    You can manage spans with a variety of annotations.

    -

    9.1. Rationale

    +

    10.1. Rationale

    There are a number of good reasons to manage spans with annotations, including:

    @@ -1414,7 +1423,7 @@ Now you can provide annotations over interfaces and the arguments of those inter
    -

    9.2. Creating New Spans

    +

    10.2. Creating New Spans

    If you do not want to create local spans manually, you can use the @NewSpan annotation. Also, we provide the @SpanTag annotation to add tags in an automated fashion.

    @@ -1470,7 +1479,7 @@ concrete one wins (in this case customNameOnTestMethod3 is set).

    -

    9.3. Continuing Spans

    +

    10.3. Continuing Spans

    If you want to add tags and annotations to an existing span, you can use the @ContinueSpan annotation, as shown in the following example:

    @@ -1506,7 +1515,7 @@ this.testBean.testMethod13();
    -

    9.4. Advanced Tag Setting

    +

    10.4. Advanced Tag Setting

    There are 3 different ways to add tags to a span. All of them are controlled by the SpanTag annotation. The precedence is as follows:

    @@ -1528,7 +1537,7 @@ The default implementation uses SPEL expression resolution.
    -

    9.4.1. Custom extractor

    +

    10.4.1. Custom extractor

    The value of the tag for the following method is computed by an implementation of TagValueResolver interface. Its class name has to be passed as the value of the resolver attribute.

    @@ -1560,7 +1569,7 @@ public TagValueResolver tagValueResolver() {
    -

    9.4.2. Resolving Expressions for a Value

    +

    10.4.2. Resolving Expressions for a Value

    Consider the following annotated method:

    @@ -1578,7 +1587,7 @@ If you want to use some other expression resolution mechanism, you can create yo
    -

    9.4.3. Using the toString() method

    +

    10.4.3. Using the toString() method

    Consider the following annotated method:

    @@ -1597,7 +1606,7 @@ public void getAnnotationForArgumentToString(@SpanTag("test") Long param) {
    -

    10. Customizations

    +

    11. Customizations

    The Tracer object is fully managed by sleuth, so you rarely need to affect it. That said, @@ -1631,9 +1640,9 @@ customize behaviour:

    -

    10.1. HTTP

    +

    11.1. HTTP

    -

    10.1.1. Data Policy

    +

    11.1.1. Data Policy

    The default span data policy for HTTP requests is described in Brave: github.com/openzipkin/brave/tree/master/instrumentation/http#span-data-policy

    @@ -1675,7 +1684,7 @@ class Config {
    -

    10.1.2. Sampling

    +

    11.1.2. Sampling

    If client /server sampling is required, just register a bean of type brave.sampler.SamplerFunction<HttpRequest> and name the bean @@ -1718,7 +1727,7 @@ class Config {

    -

    10.2. TracingFilter

    +

    11.2. TracingFilter

    You can also modify the behavior of the TracingFilter, which is the component that is responsible for processing the input HTTP request and adding tags basing on the HTTP response. You can customize the tags or modify the response headers by registering your own instance of the TracingFilter bean.

    @@ -1759,7 +1768,7 @@ class MyFilter extends GenericFilterBean {
    -

    10.3. Messaging

    +

    11.3. Messaging

    Sleuth automatically configures the MessagingTracing bean which serves as a foundation for Messaging instrumentation such as Kafka or JMS.

    @@ -1792,7 +1801,7 @@ class Config {
    -

    10.4. RPC

    +

    11.4. RPC

    Sleuth automatically configures the RpcTracing bean which serves as a foundation for RPC instrumentation such as gRPC or Dubbo.

    @@ -1833,7 +1842,7 @@ class Config {
    -

    10.5. Custom service name

    +

    11.5. Custom service name

    By default, Sleuth assumes that, when you send a span to Zipkin, you want the span’s service name to be equal to the value of the spring.application.name property. That is not always the case, though. @@ -1847,7 +1856,7 @@ To achieve that, you can pass the following property to your application to over

    -

    10.6. Customization of Reported Spans

    +

    11.6. Customization of Reported Spans

    Before reporting spans (for example, to Zipkin) you may want to modify that span in some way. You can do so by using the FinishedSpanHandler interface.

    @@ -1890,7 +1899,7 @@ FinishedSpanHandler handlerTwo() {
    -

    10.7. Host Locator

    +

    11.7. Host Locator

    @@ -1921,7 +1930,7 @@ If those are not set, we try to retrieve the host name from the network interfac
    -

    11. Sending Spans to Zipkin

    +

    12. Sending Spans to Zipkin

    By default, if you add spring-cloud-starter-zipkin as a dependency to your project, when the span is closed, it is sent to Zipkin over HTTP. @@ -2002,7 +2011,7 @@ object, you will have to create a bean of zipkin2.reporter.Sender t

    @@ -2024,10 +2033,10 @@ In the Finchley release, it got removed.
    -

    13. Integrations

    +

    14. Integrations

    -

    13.1. OpenTracing

    +

    14.1. OpenTracing

    Spring Cloud Sleuth is compatible with OpenTracing. If you have OpenTracing on the classpath, we automatically register the OpenTracing Tracer bean. @@ -2035,7 +2044,7 @@ If you wish to disable this, set spring.sleuth.opentracing.enabled

    -

    13.2. Runnable and Callable

    +

    14.2. Runnable and Callable

    If you wrap your logic in Runnable or Callable, you can wrap those classes in their Sleuth representative, as shown in the following example for Runnable:

    @@ -2091,13 +2100,13 @@ Callable<String> traceCallableFromTracer = this.tracing.currentTraceContex
    -

    13.3. Spring Cloud CircuitBreaker

    +

    14.3. Spring Cloud CircuitBreaker

    If you have Spring Cloud CircuitBreaker on the classpath, we will wrap the passed command Supplier and the fallback Function in its trace representations. In order to disable this instrumentation set spring.sleuth.circuitbreaker.enabled to false.

    -

    13.4. RxJava

    +

    14.4. RxJava

    We registering a custom RxJavaSchedulersHook that wraps all Action0 instances in their Sleuth representative, which is called TraceAction. The hook either starts or continues a span, depending on whether tracing was already going on before the Action was scheduled. @@ -2122,12 +2131,12 @@ the Reactor support.

    -

    13.5. HTTP integration

    +

    14.5. HTTP integration

    Features from this section can be disabled by setting the spring.sleuth.web.enabled property with value equal to false.

    -

    13.5.1. HTTP Filter

    +

    14.5.1. HTTP Filter

    Through the TracingFilter, all sampled incoming requests result in creation of a Span. That Span’s name is http: + the path to which the request was sent. @@ -2151,7 +2160,7 @@ to true.

    -

    13.5.2. HandlerInterceptor

    +

    14.5.2. HandlerInterceptor

    Since we want the span names to be precise, we use a TraceHandlerInterceptor that either wraps an existing HandlerInterceptor or is added directly to the list of existing HandlerInterceptors. The TraceHandlerInterceptor adds a special request attribute to the given HttpServletRequest. @@ -2161,13 +2170,13 @@ In that case, please file an issue in Spring Cloud Sleuth.

    -

    13.5.3. Async Servlet support

    +

    14.5.3. Async Servlet support

    If your controller returns a Callable or a WebAsyncTask, Spring Cloud Sleuth continues the existing span instead of creating a new one.

    -

    13.5.4. WebFlux support

    +

    14.5.4. WebFlux support

    Through TraceWebFilter, all sampled incoming requests result in creation of a Span. That Span’s name is http: + the path to which the request was sent. @@ -2182,7 +2191,7 @@ If you want to reuse Sleuth’s default skip patterns and append your own, p

    -

    13.5.5. Dubbo RPC support

    +

    14.5.5. Dubbo RPC support

    Via the integration with Brave, Spring Cloud Sleuth supports Dubbo. It’s enough to add the brave-instrumentation-dubbo dependency:

    @@ -2211,9 +2220,9 @@ An example of Spring Cloud Sleuth and Dubbo can be found -

    13.6. HTTP Client Integration

    +

    14.6. HTTP Client Integration

    -

    13.6.1. Synchronous Rest Template

    +

    14.6.1. Synchronous Rest Template

    We inject a RestTemplate interceptor to ensure that all the tracing information is passed to the requests. Each time a call is made, a new Span is created. @@ -2235,7 +2244,7 @@ If you create a RestTemplate instance with a new keywo

    @@ -2292,7 +2301,7 @@ static class Config {
    -

    13.6.3. WebClient

    +

    14.6.3. WebClient

    We inject a ExchangeFilterFunction implementation that creates a span and, through on-success and on-error callbacks, takes care of closing client-side spans.

    @@ -2314,7 +2323,7 @@ If you create a WebClient instance with a new keyword,
    -

    13.6.4. Traverson

    +

    14.6.4. Traverson

    If you use the Traverson library, you can inject a RestTemplate as a bean into your Traverson object. Since RestTemplate is already intercepted, you get full support for tracing in your client. The following pseudo code @@ -2331,7 +2340,7 @@ Traverson traverson = new Traverson(URI.create("https://some/address"),

    -

    13.6.5. Apache HttpClientBuilder and HttpAsyncClientBuilder

    +

    14.6.5. Apache HttpClientBuilder and HttpAsyncClientBuilder

    We instrument the HttpClientBuilder and HttpAsyncClientBuilder so that tracing context gets injected to the sent requests.

    @@ -2341,7 +2350,7 @@ tracing context gets injected to the sent requests.

    -

    13.6.6. Netty HttpClient

    +

    14.6.6. Netty HttpClient

    We instrument the Netty’s HttpClient.

    @@ -2363,7 +2372,7 @@ If you create a HttpClient instance with a new keyword
    -

    13.6.7. UserInfoRestTemplateCustomizer

    +

    14.6.7. UserInfoRestTemplateCustomizer

    We instrument the Spring Security’s UserInfoRestTemplateCustomizer.

    @@ -2373,7 +2382,7 @@ If you create a HttpClient instance with a new keyword
    -

    13.7. Feign

    +

    14.7. Feign

    By default, Spring Cloud Sleuth provides integration with Feign through TraceFeignClientAutoConfiguration. You can disable it entirely by setting spring.sleuth.feign.enabled to false. @@ -2387,12 +2396,12 @@ However, all the default instrumentation is still there.

    -

    13.8. gRPC

    +

    14.8. gRPC

    Spring Cloud Sleuth provides instrumentation for gRPC through TraceGrpcAutoConfiguration. You can disable it entirely by setting spring.sleuth.grpc.enabled to false.

    -

    13.8.1. Variant 1

    +

    14.8.1. Variant 1

    Dependencies
    @@ -2461,16 +2470,16 @@ Spring Cloud Sleuth provides a SpringAwareManagedChannelBuilder tha
    -

    13.8.2. Variant 2

    +

    14.8.2. Variant 2

    Grpc Spring Boot Starter automatically detects the presence of Spring Cloud Sleuth and brave’s instrumentation for gRPC and registers the necessary client and/or server tooling.

    -

    13.9. Asynchronous Communication

    +

    14.9. Asynchronous Communication

    -

    13.9.1. @Async Annotated methods

    +

    14.9.1. @Async Annotated methods

    In Spring Cloud Sleuth, we instrument async-related components so that the tracing information is passed between threads. You can disable this behavior by setting the value of spring.sleuth.async.enabled to false.

    @@ -2493,7 +2502,7 @@ You can disable this behavior by setting the value of spring.sleuth.async.
    -

    13.9.2. @Scheduled Annotated Methods

    +

    14.9.2. @Scheduled Annotated Methods

    In Spring Cloud Sleuth, we instrument scheduled method execution so that the tracing information is passed between threads. You can disable this behavior by setting the value of spring.sleuth.scheduled.enabled to false.

    @@ -2516,7 +2525,7 @@ You can disable this behavior by setting the value of spring.sleuth.schedu
    -

    13.9.3. Executor, ExecutorService, and ScheduledExecutorService

    +

    14.9.3. Executor, ExecutorService, and ScheduledExecutorService

    We provide LazyTraceExecutor, TraceableExecutorService, and TraceableScheduledExecutorService. Those implementations create spans each time a new task is submitted, invoked, or scheduled.

    @@ -2603,12 +2612,12 @@ to add the @Role(BeanDefinition.ROLE_INFRASTRUCTURE) on your
    -

    13.10. Messaging

    +

    14.10. Messaging

    Features from this section can be disabled by setting the spring.sleuth.messaging.enabled property with value equal to false.

    -

    13.10.1. Spring Integration and Spring Cloud Stream

    +

    14.10.1. Spring Integration and Spring Cloud Stream

    Spring Cloud Sleuth integrates with Spring Integration. It creates spans for publish and subscribe events. @@ -2647,7 +2656,7 @@ it’s enough for you to register beans of types:

    -

    13.10.2. Spring RabbitMq

    +

    14.10.2. Spring RabbitMq

    We instrument the RabbitTemplate so that tracing headers get injected into the message.

    @@ -2657,7 +2666,7 @@ into the message.

    -

    13.10.3. Spring Kafka

    +

    14.10.3. Spring Kafka

    We instrument the Spring Kafka’s ProducerFactory and ConsumerFactory so that tracing headers get injected into the created Spring Kafka’s @@ -2668,7 +2677,7 @@ so that tracing headers get injected into the created Spring Kafka’s

    -

    13.10.4. Spring Kafka Streams

    +

    14.10.4. Spring Kafka Streams

    We instrument the KafkaStreams KafkaClientSupplier so that tracing headers get injected into the Producer and Consumer`s. A `KafkaStreamsTracing bean @@ -2680,7 +2689,7 @@ allows for further instrumentation through additional TransformerSupplier<

    -

    13.10.5. Spring JMS

    +

    14.10.5. Spring JMS

    We instrument the JmsTemplate so that tracing headers get injected into the message. We also support @JmsListener annotated methods on the consumer side.

    @@ -2702,7 +2711,7 @@ We don’t support baggage propagation for JMS
    -

    13.10.6. Spring Cloud AWS Messaging SQS

    +

    14.10.6. Spring Cloud AWS Messaging SQS

    We instrument @SqsListener which is provided by org.springframework.cloud:spring-cloud-aws-messaging so that tracing headers get extracted from the message and a trace gets put into the context.

    @@ -2713,14 +2722,14 @@ so that tracing headers get extracted from the message and a trace gets put into
    -

    13.11. Redis

    +

    14.11. Redis

    We set tracing property to Lettcue ClientResources instance to enable Brave tracing built in Lettuce . To disable Redis support, set the spring.sleuth.redis.enabled property to false.

    -

    13.12. Quartz

    +

    14.12. Quartz

    We instrument quartz jobs by adding Job/Trigger listeners to the Quartz Scheduler.

    @@ -2729,7 +2738,7 @@ To disable Redis support, set the spring.sleuth.redis.enabled prope
    -

    13.13. Project Reactor

    +

    14.13. Project Reactor

    For projects depending on Project Reactor such as Spring Cloud Gateway, we suggest turning the spring.sleuth.reactor.decorate-on-each option to false. That way an increased performance gain should be observed in comparison to the standard instrumentation mechanism. What this option does is it will wrap decorate onLast operator instead of onEach which will result in creation of far fewer objects. The downside of this is that when Project Reactor will change threads, the trace propagation will continue without issues, however anything relying on the ThreadLocal such as e.g. MDC entries can be buggy.

    @@ -2737,7 +2746,7 @@ To disable Redis support, set the spring.sleuth.redis.enabled prope
    -

    14. Configuration properties

    +

    15. Configuration properties

    To see the list of all Sleuth related configuration properties please check the Appendix page.

    @@ -2745,7 +2754,7 @@ To disable Redis support, set the spring.sleuth.redis.enabled prope
    -

    15. Running examples

    +

    16. Running examples

    You can see the running examples deployed in the Pivotal Web Services.