diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml
index 2e7786e55..d74eae027 100644
--- a/.github/workflows/maven.yml
+++ b/.github/workflows/maven.yml
@@ -1,32 +1,32 @@
-name: Build
-
-on:
- push:
- branches: [ 3.1.x ]
- pull_request:
- branches: [ 3.1.x ]
-
-jobs:
- build:
-
- runs-on: ubuntu-latest
- strategy:
- matrix:
- java: ["8", "11", "16"]
-
- steps:
- - uses: actions/checkout@v2
- - name: Setup java
- uses: actions/setup-java@v2
- with:
- distribution: 'zulu'
- java-version: ${{ matrix.java }}
- - name: Cache local Maven repository
- uses: actions/cache@v2
- with:
- path: ~/.m2/repository
- key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
- restore-keys: |
- ${{ runner.os }}-maven-
- - name: Build with Maven
- run: ./mvnw clean install -B -U -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false
+name: Build
+
+on:
+ push:
+ branches: [ 3.1.x ]
+ pull_request:
+ branches: [ 3.1.x ]
+
+jobs:
+ build:
+
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ java: ["8", "11", "16"]
+
+ steps:
+ - uses: actions/checkout@v2
+ - name: Setup java
+ uses: actions/setup-java@v2
+ with:
+ distribution: 'zulu'
+ java-version: ${{ matrix.java }}
+ - name: Cache local Maven repository
+ uses: actions/cache@v2
+ with:
+ path: ~/.m2/repository
+ key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
+ restore-keys: |
+ ${{ runner.os }}-maven-
+ - name: Build with Maven
+ run: ./mvnw clean install -B -U -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false
diff --git a/docs/pom.xml b/docs/pom.xml
index fd336d69f..cee360719 100644
--- a/docs/pom.xml
+++ b/docs/pom.xml
@@ -1,139 +1,139 @@
-
-
-
- 4.0.0
-
- org.springframework.cloud
- spring-cloud-sleuth
- 3.1.0-SNAPSHOT
-
- spring-cloud-sleuth-docs
- jar
- Spring Cloud Sleuth Docs
- Spring Sleuth Docs
-
- spring-cloud-sleuth
- ${basedir}/..
- spring.sleuth.*|spring.zipkin.*
- deploy
-
-
- 2.22.3.Final
- .*/spring-cloud-sleuth-instrumentation/.*|.*/spring-cloud-sleuth-brave/.*
-
-
-
- ${project.groupId}
- spring-cloud-starter-sleuth
-
-
- ${project.groupId}
- spring-cloud-sleuth-zipkin
-
-
- org.jboss.forge.roaster
- roaster-api
- ${roaster.version}
-
-
- org.jboss.forge.roaster
- roaster-jdt
- ${roaster.version}
-
-
- org.springframework.boot
- spring-boot-starter-test
- test
-
-
-
-
-
- org.codehaus.mojo
- build-helper-maven-plugin
- ${build-helper-maven-plugin.version}
-
-
- generate-sources
-
- add-source
-
-
-
- src/main/asciidoc
-
-
-
-
-
-
-
-
-
- docs
-
-
-
- pl.project13.maven
- git-commit-id-plugin
-
-
- maven-dependency-plugin
-
-
- maven-resources-plugin
-
-
- org.codehaus.mojo
- exec-maven-plugin
-
-
- build-tags-and-spans
- prepare-package
-
- java
-
-
- org.springframework.cloud.sleuth.documentation.DocsFromSources
-
- ${maven.multiModuleProjectDirectory}
- ${module.inclusionPattern}
- ${maven.multiModuleProjectDirectory}/docs/src/main/asciidoc/
-
- true
- true
-
-
-
-
-
- org.asciidoctor
- asciidoctor-maven-plugin
-
-
- maven-antrun-plugin
-
-
- maven-deploy-plugin
-
-
-
-
-
-
+
+
+
+ 4.0.0
+
+ org.springframework.cloud
+ spring-cloud-sleuth
+ 3.1.0-SNAPSHOT
+
+ spring-cloud-sleuth-docs
+ jar
+ Spring Cloud Sleuth Docs
+ Spring Sleuth Docs
+
+ spring-cloud-sleuth
+ ${basedir}/..
+ spring.sleuth.*|spring.zipkin.*
+ deploy
+
+
+ 2.22.3.Final
+ .*/spring-cloud-sleuth-instrumentation/.*|.*/spring-cloud-sleuth-brave/.*
+
+
+
+ ${project.groupId}
+ spring-cloud-starter-sleuth
+
+
+ ${project.groupId}
+ spring-cloud-sleuth-zipkin
+
+
+ org.jboss.forge.roaster
+ roaster-api
+ ${roaster.version}
+
+
+ org.jboss.forge.roaster
+ roaster-jdt
+ ${roaster.version}
+
+
+ org.springframework.boot
+ spring-boot-starter-test
+ test
+
+
+
+
+
+ org.codehaus.mojo
+ build-helper-maven-plugin
+ ${build-helper-maven-plugin.version}
+
+
+ generate-sources
+
+ add-source
+
+
+
+ src/main/asciidoc
+
+
+
+
+
+
+
+
+
+ docs
+
+
+
+ pl.project13.maven
+ git-commit-id-plugin
+
+
+ maven-dependency-plugin
+
+
+ maven-resources-plugin
+
+
+ org.codehaus.mojo
+ exec-maven-plugin
+
+
+ build-tags-and-spans
+ prepare-package
+
+ java
+
+
+ org.springframework.cloud.sleuth.documentation.DocsFromSources
+
+ ${maven.multiModuleProjectDirectory}
+ ${module.inclusionPattern}
+ ${maven.multiModuleProjectDirectory}/docs/src/main/asciidoc/
+
+ true
+ true
+
+
+
+
+
+ org.asciidoctor
+ asciidoctor-maven-plugin
+
+
+ maven-antrun-plugin
+
+
+ maven-deploy-plugin
+
+
+
+
+
+
diff --git a/docs/src/main/asciidoc/appendix.adoc b/docs/src/main/asciidoc/appendix.adoc
index 4798f62e5..6b6fd036e 100644
--- a/docs/src/main/asciidoc/appendix.adoc
+++ b/docs/src/main/asciidoc/appendix.adoc
@@ -1,22 +1,22 @@
-:numbered!:
-
-[[appendix]]
-[[common-application-properties]]
-== Common application properties
-
-include::_attributes.adoc[]
-
-Various properties can be specified inside your `application.properties` file, inside your `application.yml` file, or as command line switches.
-This appendix provides a list of common {project-full-name} properties and references to the underlying classes that consume them.
-
-NOTE: Property contributions can come from additional jar files on your classpath, so you should not consider this an exhaustive list.
-Also, you can define your own properties.
-
-include::_configprops.adoc[]
-
-[[sleuth-spans]]
-== Spring Cloud Sleuth Spans
-
-Below you can find a list of all the spans that are created by Spring Cloud Sleuth.
-
-include::_spans.adoc[]
+:numbered!:
+
+[[appendix]]
+[[common-application-properties]]
+== Common application properties
+
+include::_attributes.adoc[]
+
+Various properties can be specified inside your `application.properties` file, inside your `application.yml` file, or as command line switches.
+This appendix provides a list of common {project-full-name} properties and references to the underlying classes that consume them.
+
+NOTE: Property contributions can come from additional jar files on your classpath, so you should not consider this an exhaustive list.
+Also, you can define your own properties.
+
+include::_configprops.adoc[]
+
+[[sleuth-spans]]
+== Spring Cloud Sleuth Spans
+
+Below you can find a list of all the spans that are created by Spring Cloud Sleuth.
+
+include::_spans.adoc[]
diff --git a/docs/src/main/asciidoc/index.adoc b/docs/src/main/asciidoc/index.adoc
index dd1a0a718..67816bddb 100644
--- a/docs/src/main/asciidoc/index.adoc
+++ b/docs/src/main/asciidoc/index.adoc
@@ -1 +1 @@
-include::spring-cloud-sleuth.adoc[]
+include::spring-cloud-sleuth.adoc[]
diff --git a/docs/src/main/asciidoc/integrations.adoc b/docs/src/main/asciidoc/integrations.adoc
index 21588a64c..e357b349c 100644
--- a/docs/src/main/asciidoc/integrations.adoc
+++ b/docs/src/main/asciidoc/integrations.adoc
@@ -1,741 +1,741 @@
-[[sleuth-integration]]
-= Spring Cloud Sleuth customization
-
-include::_attributes.adoc[]
-
-In this section, we describe how to customize various parts of Spring Cloud Sleuth. Please check the <> for the list of spans, tags and events.
-
-[[sleuth-kafka-integration]]
-== Apache Kafka
-
-This feature is available for all tracer implementations.
-
-We decorate the Kafka clients (`KafkaProducer` and `KafkaConsumer`) to create a span for each event that is produced or consumed. You can disable this feature by setting the value of `spring.sleuth.kafka.enabled` to `false`.
-
-IMPORTANT: You have to register the `Producer` or `Consumer` as beans in order for Sleuth's auto-configuration to decorate them. When you then inject the beans, the expected type must be `Producer` or `Consumer` (and NOT e.g. `KafkaProducer`).
-
-We also provide `TracingKafkaProducerFactory` and `TracingKafkaConsumerFactory` to be used with the https://projectreactor.io/docs/kafka/release/reference/[Reactor Kafka] clients (`KafkaSender` and `KafkaReceiver`, respectively). See an example in the snippet below:
-
-[source,java,indent=0]
-----
-@Bean
-KafkaReceiver reactiveKafkaReceiver(TracingKafkaConsumerFactory tracingKafkaConsumerFactory, KafkaReceiverOptions kafkaReceiverOptions) {
- return KafkaReceiver.create(tracingKafkaConsumerFactory, kafkaReceiverOptions);
-}
-----
-
-[[sleuth-async-integration]]
-== Asynchronous Communication
-
-In this section, we describe how to customize asynchronous communication with Spring Cloud Sleuth.
-
-[[sleuth-async-annotation-integration]]
-=== `@Async` Annotated methods
-
-This feature is available for all tracer implementations.
-
-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`.
-
-If you annotate your method with `@Async`, we automatically modify the existing Span as follows:
-
-* If the method is annotated with `@SpanName`, the value of the annotation is the Span's name.
-* If the method is not annotated with `@SpanName`, the Span name is the annotated method name.
-* The span is tagged with the method's class name and method name.
-
-Since we're modifying the existing span, if you want to maintain its original name (e.g. a span created by receiving an HTTP request)
-you should wrap your `@Async` annotated method with a `@NewSpan` annotation or create a new span manually.
-
-[[sleuth-async-scheduled-integration]]
-=== `@Scheduled` Annotated Methods
-
-This feature is available for all tracer implementations.
-
-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`.
-
-If you annotate your method with `@Scheduled`, we automatically create a new span with the following characteristics:
-
-* The span name is the annotated method name.
-* The span is tagged with the method's class name and method name.
-
-If you want to skip span creation for some `@Scheduled` annotated classes, you can set the `spring.sleuth.scheduled.skipPattern` with a regular expression that matches the fully qualified name of the `@Scheduled` annotated class.
-
-[[sleuth-async-executor-service-integration]]
-=== Executor, ExecutorService, and ScheduledExecutorService
-
-This feature is available for all tracer implementations.
-
-We provide `LazyTraceExecutor`, `TraceableExecutorService`, and `TraceableScheduledExecutorService`.
-Those implementations create spans each time a new task is submitted, invoked, or scheduled.
-
-The following example shows how to pass tracing information with `TraceableExecutorService` when working with `CompletableFuture`:
-
-[source,java,indent=0]
-----
-
-include::{common_tests_path}/src/main/java/org/springframework/cloud/sleuth/instrument/async/TraceableExecutorServiceTests.java[tags=completablefuture,indent=0]
-----
-
-IMPORTANT: Sleuth does not work with `parallelStream()` out of the box.
-If you want to have the tracing information propagated through the stream, you have to use the approach with `supplyAsync(...)`, as shown earlier.
-
-If there are beans that implement the `Executor` interface that you would like to exclude from span creation, you can use the `spring.sleuth.async.ignored-beans`
-property where you can provide a list of bean names.
-
-You can disable this behavior by setting the value of `spring.sleuth.async.enabled` to `false`.
-
-[[sleuth-async-executor-integration]]
-==== Customization of Executors
-
-Sometimes, you need to set up a custom instance of the `AsyncExecutor`.
-The following example shows how to set up such a custom `Executor`:
-
-[source,java,indent=0]
-----
-include::{common_tests_path}/src/main/java/org/springframework/cloud/sleuth/instrument/web/client/MultipleAsyncRestTemplateTests.java[tags=custom_executor,indent=0]
-----
-
-TIP: To ensure that your configuration gets post processed, remember to add the `@Role(BeanDefinition.ROLE_INFRASTRUCTURE)` on your
-`@Configuration` class
-
-[[sleuth-http-client-integration]]
-== HTTP Client Integration
-
-Features from this section can be disabled by setting the `spring.sleuth.web.client.enabled` property with value equal to `false`.
-
-[[sleuth-http-client-rest-template-integration]]
-=== Synchronous Rest Template
-
-This feature is available for all tracer implementations.
-
-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.
-It gets closed upon receiving the response.
-To block the synchronous `RestTemplate` features, set `spring.sleuth.web.client.enabled` to `false`.
-
-IMPORTANT: You have to register `RestTemplate` as a bean so that the interceptors get injected.
-If you create a `RestTemplate` instance with a `new` keyword, the instrumentation does NOT work.
-
-[[sleuth-http-client-async-rest-template-integration]]
-=== Asynchronous Rest Template
-
-This feature is available for all tracer implementations.
-
-IMPORTANT: Starting with Sleuth `2.0.0`, we no longer register a bean of `AsyncRestTemplate` type.
-It is up to you to create such a bean.
-Then we instrument it.
-
-To block the `AsyncRestTemplate` features, set `spring.sleuth.web.async.client.enabled` to `false`.
-To disable creation of the default `TraceAsyncClientHttpRequestFactoryWrapper`, set `spring.sleuth.web.async.client.factory.enabled`
-to `false`.
-If you do not want to create `AsyncRestClient` at all, set `spring.sleuth.web.async.client.template.enabled` to `false`.
-
-[[sleuth-http-client-multiple-async-rest-template-integration]]
-==== Multiple Asynchronous Rest Templates
-
-Sometimes you need to use multiple implementations of the Asynchronous Rest Template.
-In the following snippet, you can see an example of how to set up such a custom `AsyncRestTemplate`:
-
-[source,java,indent=0]
-----
-include::{common_tests_path}/src/main/java/org/springframework/cloud/sleuth/instrument/web/client/MultipleAsyncRestTemplateTests.java[tags=custom_async_rest_template,indent=0]
-----
-
-[[sleuth-http-client-webclient-integration]]
-==== `WebClient`
-
-This feature is available for all tracer implementations.
-
-We inject a `ExchangeFilterFunction` implementation that creates a span and, through on-success and on-error callbacks, takes care of closing client-side spans.
-
-To block this feature, set `spring.sleuth.web.client.enabled` to `false`.
-
-IMPORTANT: You have to register `WebClient` as a bean so that the tracing instrumentation gets applied.
-If you create a `WebClient` instance with a `new` keyword, the instrumentation does NOT work.
-
-[[sleuth-http-client-traverson-integration]]
-==== Traverson
-
-This feature is available for all tracer implementations.
-
-If you use the https://docs.spring.io/spring-hateoas/docs/current/reference/html/#client.traverson[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 shows how to do that:
-
-[source,java,indent=0]
-----
-@Autowired RestTemplate restTemplate;
-
-Traverson traverson = new Traverson(URI.create("https://some/address"),
- MediaType.APPLICATION_JSON, MediaType.APPLICATION_JSON_UTF8).setRestOperations(restTemplate);
-// use Traverson
-----
-
-[[sleuth-http-client-apache-integration]]
-==== Apache `HttpClientBuilder` and `HttpAsyncClientBuilder`
-
-This feature is available for Brave tracer implementation.
-
-We instrument the `HttpClientBuilder` and `HttpAsyncClientBuilder` so that tracing context gets injected to the sent requests.
-
-To block these features, set `spring.sleuth.web.client.enabled` to `false`.
-
-[[sleuth-http-client-netty-integration]]
-==== Netty `HttpClient`
-
-This feature is available for all tracer implementations.
-
-We instrument the Netty's `HttpClient`.
-
-To block this feature, set `spring.sleuth.web.client.enabled` to `false`.
-
-IMPORTANT: You have to register `HttpClient` as a bean so that the instrumentation happens.
-If you create a `HttpClient` instance with a `new` keyword, the instrumentation does NOT work.
-
-[[sleuth-http-client-userinfo-integration]]
-==== `UserInfoRestTemplateCustomizer`
-
-This feature is available for all tracer implementations.
-
-We instrument the Spring Security's `UserInfoRestTemplateCustomizer`.
-
-To block this feature, set `spring.sleuth.web.client.enabled` to `false`.
-
-[[sleuth-http-server-integration]]
-== HTTP Server Integration
-
-Features from this section can be disabled by setting the `spring.sleuth.web.enabled` property with value equal to `false`.
-
-[[sleuth-http-server-http-filter-integration]]
-=== HTTP Filter
-
-This feature is available for all tracer implementations.
-
-Through the `TracingFilter`, all sampled incoming requests result in creation of a Span.
-You can configure which URIs you would like to skip by setting the `spring.sleuth.web.skipPattern` property.
-If you have `ManagementServerProperties` on classpath, its value of `contextPath` gets appended to the provided skip pattern.
-If you want to reuse the Sleuth's default skip patterns and just append your own, pass those patterns by using the `spring.sleuth.web.additionalSkipPattern`.
-
-By default, all the spring boot actuator endpoints are automatically added to the skip pattern.
-If you want to disable this behaviour set `spring.sleuth.web.ignore-auto-configured-skip-patterns`
-to `true`.
-
-To change the order of tracing filter registration, please set the
-`spring.sleuth.web.filter-order` property.
-
-To disable the filter that logs uncaught exceptions you can disable the
-`spring.sleuth.web.exception-throwing-filter-enabled` property.
-
-[[sleuth-http-server-handler-interceptor-integration]]
-=== HandlerInterceptor
-
-This feature is available for all tracer implementations.
-
-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`.
-If the the `TracingFilter` does not see this attribute, it creates a "`fallback`" span, which is an additional span created on the server side so that the trace is presented properly in the UI.
-If that happens, there is probably missing instrumentation.
-In that case, please file an issue in Spring Cloud Sleuth.
-
-[[sleuth-http-server-async-integration]]
-=== Async Servlet support
-
-This feature is available for all tracer implementations.
-
-If your controller returns a `Callable` or a `WebAsyncTask`, Spring Cloud Sleuth continues the existing span instead of creating a new one.
-
-[[sleuth-http-server-webflux-integration]]
-=== WebFlux support
-
-This feature is available for all tracer implementations.
-
-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.
-For example, if the request was sent to `/this/that`, the name is `http:/this/that`.
-You can configure which URIs you would like to skip by using the `spring.sleuth.web.skipPattern` property.
-If you have `ManagementServerProperties` on the classpath, its value of `contextPath` gets appended to the provided skip pattern.
-If you want to reuse Sleuth's default skip patterns and append your own, pass those patterns by using the `spring.sleuth.web.additionalSkipPattern`.
-
-In order to achieve best results in terms of performance and context propagation we suggest that you switch the `spring.sleuth.reactor.instrumentation-type` to `MANUAL`.
-In order to execute code with the span in scope you can call `WebFluxSleuthOperators.withSpanInScope`.
-Example:
-
-[source,java,indent=0]
------
-include::{project-root}/benchmarks/src/main/java/org/springframework/cloud/sleuth/benchmarks/app/webflux/SleuthBenchmarkingSpringWebFluxApp.java[tags=simple_manual,indent=0]
------
-
-To change the order of tracing filter registration, please set the
-`spring.sleuth.web.filter-order` property.
-
-[[sleuth-messaging-integration]]
-== Messaging
-
-Features from this section can be disabled by setting the `spring.sleuth.messaging.enabled` property with value equal to `false`.
-
-[[sleuth-messaging-spring-integration-integration]]
-=== Spring Integration
-
-This feature is available for all tracer implementations.
-
-Spring Cloud Sleuth integrates with https://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`.
-
-You can provide the `spring.sleuth.integration.patterns` pattern to explicitly provide the names of channels that you want to include for tracing.
-By default, all channels but `hystrixStreamOutput` channel are included.
-
-IMPORTANT: When using the `Executor` to build a Spring Integration `IntegrationFlow`, you must use the untraced version of the `Executor`.
-Decorating the Spring Integration Executor Channel with `TraceableExecutorService` causes the spans to be improperly closed.
-
-If you want to customize the way tracing context is read from and written to message headers, it's enough for you to register beans of types:
-
-* `Propagator.Setter` - for writing headers to the message
-* `Propagator.Getter` - for reading headers from the message
-
-[[sleuth-messaging-spring-integration-customization]]
-==== Spring Integration Customization
-
-==== Customizing messaging spans
-
-In order to change the default span names and tags, just register a bean of type `MessageSpanCustomizer`. You can also
-override the existing `DefaultMessageSpanCustomizer` to extend the existing behaviour.
-
-[source,java]
-----
-@Component
-include::{common_tests_path}/src/main/java/org/springframework/cloud/sleuth/instrument/messaging/TracingChannelInterceptorTest.java[tags=message_span_customizer,indent=2]
-----
-
-[[sleuth-messaging-spring-cloud-function-integration]]
-=== Spring Cloud Function and Spring Cloud Stream
-
-This feature is available for all tracer implementations.
-
-Spring Cloud Sleuth can instrument Spring Cloud Function.
-The way to achieve it is to provide a `Function` or `Consumer` or `Supplier` that takes in a `Message` as a parameter e.g. `Function, Message>`.
-If the type is not `Message` then instrumentation will not take place.
-Out of the box instrumentation will not take place when dealing with Reactor based streams - e.g. `Function>, Flux>>`.
-
-Since Spring Cloud Stream reuses Spring Cloud Function, you'll get the instrumentation out of the box.
-
-You can disable this behavior by setting the value of `spring.sleuth.function.enabled` to `false`.
-
-In order to work with reactive Stream functions you can leverage the `MessagingSleuthOperators` utility class that allows you to manipulate the input and output messages in order to continue the tracing context and to execute custom code within the tracing context.
-
-[source,java,indent=0]
------
-include::{project-root}/benchmarks/src/main/java/org/springframework/cloud/sleuth/benchmarks/app/stream/SleuthBenchmarkingStreamApplication.java[tags=simple_reactive,indent=0]
------
-
-[[sleuth-messaging-spring-rabbitmq-integration]]
-=== Spring RabbitMq
-
-This feature is available for Brave tracer implementation.
-
-We instrument the `RabbitTemplate` so that tracing headers get injected into the message.
-
-To block this feature, set `spring.sleuth.messaging.rabbit.enabled` to `false`.
-
-[[sleuth-messaging-spring-kafka-integration]]
-=== Spring Kafka
-
-This feature is available for Brave tracer implementation.
-
-We instrument the Spring Kafka's `ProducerFactory` and `ConsumerFactory`
-so that tracing headers get injected into the created Spring Kafka's
-`Producer` and `Consumer`.
-
-To block this feature, set `spring.sleuth.messaging.kafka.enabled` to `false`.
-
-[[sleuth-messaging-spring-kafka-streams-integration]]
-=== Spring Kafka Streams
-
-This feature is available for Brave tracer implementation.
-
-We instrument the `KafkaStreams` `KafkaClientSupplier` so that tracing headers get injected into the `Producer` and `Consumer`s. A `KafkaStreamsTracing` bean allows for further instrumentation through additional `TransformerSupplier` and
-`ProcessorSupplier` methods.
-
-To block this feature, set `spring.sleuth.messaging.kafka.streams.enabled` to `false`.
-
-[[sleuth-messaging-spring-jms-integration]]
-=== Spring JMS
-
-This feature is available for Brave tracer implementation.
-
-We instrument the `JmsTemplate` so that tracing headers get injected into the message.
-We also support `@JmsListener` annotated methods on the consumer side.
-
-To block this feature, set `spring.sleuth.messaging.jms.enabled` to `false`.
-
-IMPORTANT: We don't support baggage propagation for JMS
-
-[[sleuth-openfeign-integration]]
-== OpenFeign
-
-This feature is available for all tracer implementations.
-
-By default, Spring Cloud Sleuth provides integration with Feign through `TraceFeignClientAutoConfiguration`.
-You can disable it entirely by setting `spring.sleuth.feign.enabled` to `false`.
-If you do so, no Feign-related instrumentation take place.
-
-Part of Feign instrumentation is done through a `FeignBeanPostProcessor`.
-You can disable it by setting `spring.sleuth.feign.processor.enabled` to `false`.
-If you set it to `false`, Spring Cloud Sleuth does not instrument any of your custom Feign components.
-However, all the default instrumentation is still there.
-
-[[sleuth-opentracing-integration]]
-== OpenTracing
-
-This feature is available for all tracer implementations.
-
-Spring Cloud Sleuth is compatible with https://opentracing.io/[OpenTracing].
-If you have OpenTracing on the classpath, we automatically register the OpenTracing `Tracer` bean.
-If you wish to disable this, set `spring.sleuth.opentracing.enabled` to `false`
-
-[[sleuth-quartz-integration]]
-== Quartz
-
-This feature is available for all tracer implementations.
-
-We instrument quartz jobs by adding Job/Trigger listeners to the Quartz Scheduler.
-
-To turn off this feature, set the `spring.sleuth.quartz.enabled` property to `false`.
-
-[[sleuth-reactor-integration]]
-== Reactor
-
-This feature is available for all tracer implementations.
-
-We have the following modes of instrumenting reactor based applications that can be set via `spring.sleuth.reactor.instrumentation-type` property:
-
-* `DECORATE_QUEUES` - With the new Reactor https://github.com/reactor/reactor-core/pull/2566[queue wrapping mechanism] (Reactor 3.4.3) we're instrumenting the way threads are switched by Reactor. This should lead to feature parity with `ON_EACH` with low performance impact.
-* `DECORATE_ON_EACH` - wraps every Reactor operator in a trace representation.
-Passes the tracing context in most cases.
-This mode might lead to drastic performance degradation.
-* `DECORATE_ON_LAST` - wraps last Reactor operator in a trace representation.
-Passes the tracing context in some cases thus accessing MDC context might not work.
-This mode might lead to medium performance degradation.
-* `MANUAL` - wraps every Reactor in the least invasive way without passing of tracing context.
-It's up to the user to do it.
-
-Current default is `ON_EACH` for backward compatibility reasons, however we encourage the users to migrate to the `MANUAL` instrumentation and profit from `WebFluxSleuthOperators` and `MessagingSleuthOperators`.
-The performance improvement can be substantial.
-Example:
-
-[source,java,indent=0]
------
-include::{project-root}/benchmarks/src/main/java/org/springframework/cloud/sleuth/benchmarks/app/webflux/SleuthBenchmarkingSpringWebFluxApp.java[tags=simple_manual,indent=0]
------
-
-[[sleuth-redis-integration]]
-== Redis
-
-This feature is available for Brave tracer implementation.
-
-We set `tracing` property to Lettuce `ClientResources` instance to enable Brave tracing built in Lettuce.
-
-Spring Cloud Sleuth will provide a traced version of the `ClientResources` bean. If you have your own implementation of that bean, remember to customize the `ClientResources.Builder` with a stream of `ClientResourcesBuilderCustomizer`s like presented below:
-
-[source,java,indent=0]
-----
- @Bean(destroyMethod = "shutdown")
- DefaultClientResources myLettuceClientResources(ObjectProvider customizer) {
- DefaultClientResources.Builder builder = DefaultClientResources.builder();
- // setting up the builder manually
- customizer.stream().forEach(c -> c.customize(builder));
- return builder.build();
- }
-----
-
-To disable Redis support, set the `spring.sleuth.redis.enabled` property to `false`.
-
-[[sleuth-runnablecallable-integration]]
-== Runnable and Callable
-
-This feature is available for all tracer implementations.
-
-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`:
-
-[source,java,indent=0]
-----
-include::{brave_path}/src/test/java/org/springframework/cloud/sleuth/brave/SpringCloudSleuthDocTests.java[tags=trace_runnable,indent=0]
-----
-
-The following example shows how to do so for `Callable`:
-
-[source,java,indent=0]
-----
-include::{brave_path}/src/test/java/org/springframework/cloud/sleuth/brave/SpringCloudSleuthDocTests.java[tags=trace_callable,indent=0]
-----
-
-That way, you ensure that a new span is created and closed for each execution.
-
-[[sleuth-rpc-integration]]
-== RPC
-
-This feature is available for Brave tracer implementation.
-
-Sleuth automatically configures the `RpcTracing` bean which serves as a foundation for RPC instrumentation such as gRPC or Dubbo.
-
-If a customization of client / server sampling of the RPC traces is required, just register a bean of type `brave.sampler.SamplerFunction` and name the bean `sleuthRpcClientSampler` for client sampler and
-`sleuthRpcServerSampler` for server sampler.
-
-For your convenience the `@RpcClientSampler` and `@RpcServerSampler`
-annotations can be used to inject the proper beans or to reference the bean names via their static String `NAME` fields.
-
-Ex.
-Here's a sampler that traces 100 "GetUserToken" server requests per second.
-This doesn't start new traces for requests to the health check service.
-Other requests will use the global sampling configuration.
-
-[source,java,indent=0]
-----
-@Configuration(proxyBeanMethods = false)
- class Config {
-include::{autoconfig_path}/src/test/java/org/springframework/cloud/sleuth/autoconfig/brave/instrument/rpc/BraveRpcAutoConfigurationIntegrationTests.java[tags=custom_rpc_server_sampler,indent=2]
-}
-----
-
-For more, see https://github.com/openzipkin/brave/tree/master/instrumentation/rpc#sampling-policy
-
-[[sleuth-rpc-dubbo-integration]]
-=== Dubbo RPC support
-
-Via the integration with Brave, Spring Cloud Sleuth supports https://dubbo.apache.org/[Dubbo].
-It's enough to add the `brave-instrumentation-dubbo` dependency:
-
-[source,xml,indent=0]
-----
-
- io.zipkin.brave
- brave-instrumentation-dubbo
-
-----
-
-You need to also set a `dubbo.properties` file with the following contents:
-
-```properties
-dubbo.provider.filter=tracing
-dubbo.consumer.filter=tracing
-```
-
-You can read more about Brave - Dubbo integration https://github.com/openzipkin/brave/tree/master/instrumentation/dubbo-rpc[here].
-An example of Spring Cloud Sleuth and Dubbo can be found https://github.com/openzipkin/sleuth-webmvc-example/compare/add-dubbo-tracing[here].
-
-[[sleuth-rpc-grpc-integration]]
-=== gRPC
-
-Spring Cloud Sleuth provides instrumentation for https://grpc.io/[gRPC] via the Brave tracer.
-You can disable it entirely by setting `spring.sleuth.grpc.enabled` to `false`.
-
-[[sleuth-rpc-grpc-variant1-integration]]
-==== Variant 1
-
-[[sleuth-rpc-grpc-variant1-dependencies-integration]]
-===== Dependencies
-
-IMPORTANT: The gRPC integration relies on two external libraries to instrument clients and servers and both of those libraries must be on the class path to enable the instrumentation.
-
-Maven:
-
-```
-
- io.github.lognet
- grpc-spring-boot-starter
-
-
- io.zipkin.brave
- brave-instrumentation-grpc
-
-```
-
-Gradle:
-
-```
- compile("io.github.lognet:grpc-spring-boot-starter")
- compile("io.zipkin.brave:brave-instrumentation-grpc")
-```
-
-[[sleuth-rpc-grpc-variant1-server-integration]]
-===== Server Instrumentation
-
-Spring Cloud Sleuth leverages grpc-spring-boot-starter to register Brave's gRPC server interceptor with all services annotated with `@GRpcService`.
-
-[[sleuth-rpc-grpc-variant1-client-integration]]
-===== Client Instrumentation
-
-gRPC clients leverage a `ManagedChannelBuilder` to construct a `ManagedChannel` used to communicate to the gRPC server.
-The native `ManagedChannelBuilder` provides static methods as entry points for construction of `ManagedChannel` instances, however, this mechanism is outside the influence of the Spring application context.
-
-IMPORTANT: Spring Cloud Sleuth provides a `SpringAwareManagedChannelBuilder` that can be customized through the Spring application context and injected by gRPC clients.
-*This builder must be used when creating `ManagedChannel` instances.*
-
-Sleuth creates a `TracingManagedChannelBuilderCustomizer` which inject Brave's client interceptor into the `SpringAwareManagedChannelBuilder`.
-
-[[sleuth-rpc-grpc-variant2-integration]]
-==== Variant 2
-
-https://github.com/yidongnan/grpc-spring-boot-starter[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.
-
-[[sleuth-rxjava-integration]]
-== RxJava
-
-This feature is available for all tracer implementations.
-
-We registering a custom https://github.com/ReactiveX/RxJava/wiki/Plugins#rxjavaschedulershook[`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.
-To disable the custom `RxJavaSchedulersHook`, set the `spring.sleuth.rxjava.schedulers.hook.enabled` to `false`.
-
-You can define a list of regular expressions for thread names for which you do not want spans to be created.
-To do so, provide a comma-separated list of regular expressions in the `spring.sleuth.rxjava.schedulers.ignoredthreads` property.
-
-IMPORTANT: The suggested approach to reactive programming and Sleuth is to use the Reactor support.
-
-[[sleuth-circuitbreaker-integration]]
-== Spring Cloud CircuitBreaker
-
-This feature is available for all tracer implementations.
-
-If you have Spring Cloud CircuitBreaker on the classpath, we will wrap the passed command `Supplier` and the fallback `Function` in its trace representations. We will also instrument the reactive implementation of the CircuitBreaker.
-In order to disable this instrumentation set `spring.sleuth.circuitbreaker.enabled` to `false`.
-
-[[sleuth-config-server-integration]]
-== Spring Cloud Config Server
-
-This feature is available for all tracer implementations.
-
-If you have Spring Cloud Config Server running on the classpath, we will wrap the `EnvironmentRepository` in a span.
-In order to disable this instrumentation set `spring.sleuth.config.server.enabled` to `false`.
-
-[[sleuth-deployer-integration]]
-== Spring Cloud Deployer
-
-This feature is available for all tracer implementations.
-
-If you have Spring Cloud Deployer running on the classpath, we wrap the `AppDeployer` in a trace representation. We are polling the application for its status at a default interval. You can change that default by setting the `spring.sleuth.deployer.status-poll-delay` property.
-In order to disable this instrumentation set `spring.sleuth.deployer.enabled` to `false`.
-
-[[sleuth-rsocket-integration]]
-== Spring RSocket
-
-This feature is available for all tracer implementations.
-
-If you have Spring RSocket running on the classpath, we wrap the inbound and outbound communication to propagate the tracing context via the metadata.
-In order to disable this instrumentation set `spring.sleuth.rsocket.enabled` to `false`.
-
-[[sleuth-batch-integration]]
-== Spring Batch
-
-This feature is available for all tracer implementations.
-
-If you have Spring Batch running on the classpath, we wrap the `StepBuilderFactory` and the `JobBuilderFactory` to propagate the tracing context.
-In order to disable this instrumentation set `spring.sleuth.batch.enabled` to `false`.
-
-[[sleuth-tx-integration]]
-== Spring Tx
-
-This feature is available for all tracer implementations.
-
-If you have Spring Tx on the classpath we will instrument the `PlatformTransactionManager` and the `ReactiveTransactionManager` to create a span whenever a new transaction is created.
-In order to disable this instrumentation set `spring.sleuth.tx.enabled` to `false`.
-
-[[sleuth-r2dbc-integration]]
-== R2DBC
-
-This feature is available for all tracer implementations.
-
-If you have R2DBC Proxy on the classpath we will instrument the `ConnectionFactory`so that it contains a custom `ProxyExecutionListener`.
-In order to disable this instrumentation set `spring.sleuth.r2dbc.enabled` to `false`.
-
-[[sleuth-vault-integration]]
-== Spring Vault
-
-This feature is available for all tracer implementations.
-
-We're instrumenting the `RestTemplate` or `WebClient` instances used by Spring Vault to communicate with Vault.
-In order to disable this instrumentation set `spring.sleuth.vault.enabled` to `false`.
-
-[[sleuth-tomcat-integration]]
-== Spring Tomcat
-
-This feature is available for all tracer implementations.
-
-We're adding an instrumented Tomcat's `Valve` that originates the span.
-In order to disable this instrumentation set `spring.sleuth.web.tomcat.enabled` to `false`.
-
-[[sleuth-cassandra-integration]]
-== Spring Data Cassandra
-
-This feature is available for all tracer implementations.
-
-We're instrumenting Casandra's `CqlSession` and `ReactiveSession` interfaces and we're providing our own implementation of the `RequestTracker`.
-In order to disable this instrumentation set `spring.sleuth.cassandra.enabled` to `false`.
-
-[[sleuth-jdbc-integration]]
-== Spring JDBC
-
-This feature is available for all tracer implementations. It has been ported from the https://github.com/gavlyukovskiy/spring-boot-data-source-decorator/[spring-boot-datasource-decorator] project.
-
-We're decorating `DataSource`s in a trace representation. We delegate actual proxying to either https://github.com/p6spy/p6spy[p6spy] or https://github.com/ttddyy/datasource-proxy[datasource-proxy]. In order to use this feature you need to have them on the classpath.
-
-====
-[source,xml,indent=0,subs="verbatim,attributes",role="primary"]
-.P6Spy Maven
-----
-
- p6spy
- p6spy
- ${p6spy.version}
- runtime
-
-----
-
-[source,yml,indent=0,subs="verbatim,attributes",role="secondary"]
-.P6Spy Gradle
-----
-runtimeOnly "p6spy:p6spy:${p6spyVersion}"
-----
-
-[source,xml,indent=0,subs="verbatim,attributes",role="secondary"]
-.Datasource Proxy Maven
-----
-
- net.ttddyy
- datasource-proxy
- ${datasource-proxy.version}
- runtime
-
-----
-
-[source,groovy,indent=0,subs="verbatim,attributes",role="secondary"]
-.Datasource Proxy Gradle
-----
-runtimeOnly "net.ttddyy:datasource-proxy:${datasourceProxyVersion}"
-----
-====
-
-Please check the <> page under `spring.sleuth.jdbc.p6spy` for all p6spy configuration options and `spring.sleuth.jdbc.datasource-proxy` for all datasource proxy configuration options.
-
-You can configure P6Spy manually using one of available configuration methods. For more information please refer to the http://p6spy.readthedocs.io/en/latest/configandusage.html[P6Spy Configuration Guide].
-
-By default logging queries will be disabled, set `spring.sleuth.jdbc.datasource-proxy.slow-query.enable-logging` to `true` to enable logging slow queries
-and set `spring.sleuth.jdbc.datasource-proxy.query.enable-logging` to `true` to enable logging all queries.
-
-In order to disable this instrumentation set `spring.sleuth.jdbc.enabled` to `false`.
-
-[[sleuth-session-integration]]
-== Spring Session
-
-This feature is available for all tracer implementations.
-
-We're instrumenting the `Session` repositories that wraps all operations in a span.
-In order to disable this instrumentation set `spring.sleuth.session.enabled` to `false`.
-
-[[sleuth-kotlin-integration]]
-== Kotlin Coroutines
-
-This feature is available for all tracer implementations.
-
-We're adding Kotlin Coroutines that allow you to retrieve the current span via the `Tracer` bean. You can either pass the bean to the Kotlin Coroutine context via `Tracer.asContextElement()` method execution or if you have Reactor Kotlin Coroutine integration on the classpath, we will retrieve it from Reactor's context. To retrieve the current span you can call the `currentSpan()` method within the Kotlin Coroutine.
+[[sleuth-integration]]
+= Spring Cloud Sleuth customization
+
+include::_attributes.adoc[]
+
+In this section, we describe how to customize various parts of Spring Cloud Sleuth. Please check the <> for the list of spans, tags and events.
+
+[[sleuth-kafka-integration]]
+== Apache Kafka
+
+This feature is available for all tracer implementations.
+
+We decorate the Kafka clients (`KafkaProducer` and `KafkaConsumer`) to create a span for each event that is produced or consumed. You can disable this feature by setting the value of `spring.sleuth.kafka.enabled` to `false`.
+
+IMPORTANT: You have to register the `Producer` or `Consumer` as beans in order for Sleuth's auto-configuration to decorate them. When you then inject the beans, the expected type must be `Producer` or `Consumer` (and NOT e.g. `KafkaProducer`).
+
+We also provide `TracingKafkaProducerFactory` and `TracingKafkaConsumerFactory` to be used with the https://projectreactor.io/docs/kafka/release/reference/[Reactor Kafka] clients (`KafkaSender` and `KafkaReceiver`, respectively). See an example in the snippet below:
+
+[source,java,indent=0]
+----
+@Bean
+KafkaReceiver reactiveKafkaReceiver(TracingKafkaConsumerFactory tracingKafkaConsumerFactory, KafkaReceiverOptions kafkaReceiverOptions) {
+ return KafkaReceiver.create(tracingKafkaConsumerFactory, kafkaReceiverOptions);
+}
+----
+
+[[sleuth-async-integration]]
+== Asynchronous Communication
+
+In this section, we describe how to customize asynchronous communication with Spring Cloud Sleuth.
+
+[[sleuth-async-annotation-integration]]
+=== `@Async` Annotated methods
+
+This feature is available for all tracer implementations.
+
+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`.
+
+If you annotate your method with `@Async`, we automatically modify the existing Span as follows:
+
+* If the method is annotated with `@SpanName`, the value of the annotation is the Span's name.
+* If the method is not annotated with `@SpanName`, the Span name is the annotated method name.
+* The span is tagged with the method's class name and method name.
+
+Since we're modifying the existing span, if you want to maintain its original name (e.g. a span created by receiving an HTTP request)
+you should wrap your `@Async` annotated method with a `@NewSpan` annotation or create a new span manually.
+
+[[sleuth-async-scheduled-integration]]
+=== `@Scheduled` Annotated Methods
+
+This feature is available for all tracer implementations.
+
+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`.
+
+If you annotate your method with `@Scheduled`, we automatically create a new span with the following characteristics:
+
+* The span name is the annotated method name.
+* The span is tagged with the method's class name and method name.
+
+If you want to skip span creation for some `@Scheduled` annotated classes, you can set the `spring.sleuth.scheduled.skipPattern` with a regular expression that matches the fully qualified name of the `@Scheduled` annotated class.
+
+[[sleuth-async-executor-service-integration]]
+=== Executor, ExecutorService, and ScheduledExecutorService
+
+This feature is available for all tracer implementations.
+
+We provide `LazyTraceExecutor`, `TraceableExecutorService`, and `TraceableScheduledExecutorService`.
+Those implementations create spans each time a new task is submitted, invoked, or scheduled.
+
+The following example shows how to pass tracing information with `TraceableExecutorService` when working with `CompletableFuture`:
+
+[source,java,indent=0]
+----
+
+include::{common_tests_path}/src/main/java/org/springframework/cloud/sleuth/instrument/async/TraceableExecutorServiceTests.java[tags=completablefuture,indent=0]
+----
+
+IMPORTANT: Sleuth does not work with `parallelStream()` out of the box.
+If you want to have the tracing information propagated through the stream, you have to use the approach with `supplyAsync(...)`, as shown earlier.
+
+If there are beans that implement the `Executor` interface that you would like to exclude from span creation, you can use the `spring.sleuth.async.ignored-beans`
+property where you can provide a list of bean names.
+
+You can disable this behavior by setting the value of `spring.sleuth.async.enabled` to `false`.
+
+[[sleuth-async-executor-integration]]
+==== Customization of Executors
+
+Sometimes, you need to set up a custom instance of the `AsyncExecutor`.
+The following example shows how to set up such a custom `Executor`:
+
+[source,java,indent=0]
+----
+include::{common_tests_path}/src/main/java/org/springframework/cloud/sleuth/instrument/web/client/MultipleAsyncRestTemplateTests.java[tags=custom_executor,indent=0]
+----
+
+TIP: To ensure that your configuration gets post processed, remember to add the `@Role(BeanDefinition.ROLE_INFRASTRUCTURE)` on your
+`@Configuration` class
+
+[[sleuth-http-client-integration]]
+== HTTP Client Integration
+
+Features from this section can be disabled by setting the `spring.sleuth.web.client.enabled` property with value equal to `false`.
+
+[[sleuth-http-client-rest-template-integration]]
+=== Synchronous Rest Template
+
+This feature is available for all tracer implementations.
+
+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.
+It gets closed upon receiving the response.
+To block the synchronous `RestTemplate` features, set `spring.sleuth.web.client.enabled` to `false`.
+
+IMPORTANT: You have to register `RestTemplate` as a bean so that the interceptors get injected.
+If you create a `RestTemplate` instance with a `new` keyword, the instrumentation does NOT work.
+
+[[sleuth-http-client-async-rest-template-integration]]
+=== Asynchronous Rest Template
+
+This feature is available for all tracer implementations.
+
+IMPORTANT: Starting with Sleuth `2.0.0`, we no longer register a bean of `AsyncRestTemplate` type.
+It is up to you to create such a bean.
+Then we instrument it.
+
+To block the `AsyncRestTemplate` features, set `spring.sleuth.web.async.client.enabled` to `false`.
+To disable creation of the default `TraceAsyncClientHttpRequestFactoryWrapper`, set `spring.sleuth.web.async.client.factory.enabled`
+to `false`.
+If you do not want to create `AsyncRestClient` at all, set `spring.sleuth.web.async.client.template.enabled` to `false`.
+
+[[sleuth-http-client-multiple-async-rest-template-integration]]
+==== Multiple Asynchronous Rest Templates
+
+Sometimes you need to use multiple implementations of the Asynchronous Rest Template.
+In the following snippet, you can see an example of how to set up such a custom `AsyncRestTemplate`:
+
+[source,java,indent=0]
+----
+include::{common_tests_path}/src/main/java/org/springframework/cloud/sleuth/instrument/web/client/MultipleAsyncRestTemplateTests.java[tags=custom_async_rest_template,indent=0]
+----
+
+[[sleuth-http-client-webclient-integration]]
+==== `WebClient`
+
+This feature is available for all tracer implementations.
+
+We inject a `ExchangeFilterFunction` implementation that creates a span and, through on-success and on-error callbacks, takes care of closing client-side spans.
+
+To block this feature, set `spring.sleuth.web.client.enabled` to `false`.
+
+IMPORTANT: You have to register `WebClient` as a bean so that the tracing instrumentation gets applied.
+If you create a `WebClient` instance with a `new` keyword, the instrumentation does NOT work.
+
+[[sleuth-http-client-traverson-integration]]
+==== Traverson
+
+This feature is available for all tracer implementations.
+
+If you use the https://docs.spring.io/spring-hateoas/docs/current/reference/html/#client.traverson[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 shows how to do that:
+
+[source,java,indent=0]
+----
+@Autowired RestTemplate restTemplate;
+
+Traverson traverson = new Traverson(URI.create("https://some/address"),
+ MediaType.APPLICATION_JSON, MediaType.APPLICATION_JSON_UTF8).setRestOperations(restTemplate);
+// use Traverson
+----
+
+[[sleuth-http-client-apache-integration]]
+==== Apache `HttpClientBuilder` and `HttpAsyncClientBuilder`
+
+This feature is available for Brave tracer implementation.
+
+We instrument the `HttpClientBuilder` and `HttpAsyncClientBuilder` so that tracing context gets injected to the sent requests.
+
+To block these features, set `spring.sleuth.web.client.enabled` to `false`.
+
+[[sleuth-http-client-netty-integration]]
+==== Netty `HttpClient`
+
+This feature is available for all tracer implementations.
+
+We instrument the Netty's `HttpClient`.
+
+To block this feature, set `spring.sleuth.web.client.enabled` to `false`.
+
+IMPORTANT: You have to register `HttpClient` as a bean so that the instrumentation happens.
+If you create a `HttpClient` instance with a `new` keyword, the instrumentation does NOT work.
+
+[[sleuth-http-client-userinfo-integration]]
+==== `UserInfoRestTemplateCustomizer`
+
+This feature is available for all tracer implementations.
+
+We instrument the Spring Security's `UserInfoRestTemplateCustomizer`.
+
+To block this feature, set `spring.sleuth.web.client.enabled` to `false`.
+
+[[sleuth-http-server-integration]]
+== HTTP Server Integration
+
+Features from this section can be disabled by setting the `spring.sleuth.web.enabled` property with value equal to `false`.
+
+[[sleuth-http-server-http-filter-integration]]
+=== HTTP Filter
+
+This feature is available for all tracer implementations.
+
+Through the `TracingFilter`, all sampled incoming requests result in creation of a Span.
+You can configure which URIs you would like to skip by setting the `spring.sleuth.web.skipPattern` property.
+If you have `ManagementServerProperties` on classpath, its value of `contextPath` gets appended to the provided skip pattern.
+If you want to reuse the Sleuth's default skip patterns and just append your own, pass those patterns by using the `spring.sleuth.web.additionalSkipPattern`.
+
+By default, all the spring boot actuator endpoints are automatically added to the skip pattern.
+If you want to disable this behaviour set `spring.sleuth.web.ignore-auto-configured-skip-patterns`
+to `true`.
+
+To change the order of tracing filter registration, please set the
+`spring.sleuth.web.filter-order` property.
+
+To disable the filter that logs uncaught exceptions you can disable the
+`spring.sleuth.web.exception-throwing-filter-enabled` property.
+
+[[sleuth-http-server-handler-interceptor-integration]]
+=== HandlerInterceptor
+
+This feature is available for all tracer implementations.
+
+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`.
+If the the `TracingFilter` does not see this attribute, it creates a "`fallback`" span, which is an additional span created on the server side so that the trace is presented properly in the UI.
+If that happens, there is probably missing instrumentation.
+In that case, please file an issue in Spring Cloud Sleuth.
+
+[[sleuth-http-server-async-integration]]
+=== Async Servlet support
+
+This feature is available for all tracer implementations.
+
+If your controller returns a `Callable` or a `WebAsyncTask`, Spring Cloud Sleuth continues the existing span instead of creating a new one.
+
+[[sleuth-http-server-webflux-integration]]
+=== WebFlux support
+
+This feature is available for all tracer implementations.
+
+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.
+For example, if the request was sent to `/this/that`, the name is `http:/this/that`.
+You can configure which URIs you would like to skip by using the `spring.sleuth.web.skipPattern` property.
+If you have `ManagementServerProperties` on the classpath, its value of `contextPath` gets appended to the provided skip pattern.
+If you want to reuse Sleuth's default skip patterns and append your own, pass those patterns by using the `spring.sleuth.web.additionalSkipPattern`.
+
+In order to achieve best results in terms of performance and context propagation we suggest that you switch the `spring.sleuth.reactor.instrumentation-type` to `MANUAL`.
+In order to execute code with the span in scope you can call `WebFluxSleuthOperators.withSpanInScope`.
+Example:
+
+[source,java,indent=0]
+-----
+include::{project-root}/benchmarks/src/main/java/org/springframework/cloud/sleuth/benchmarks/app/webflux/SleuthBenchmarkingSpringWebFluxApp.java[tags=simple_manual,indent=0]
+-----
+
+To change the order of tracing filter registration, please set the
+`spring.sleuth.web.filter-order` property.
+
+[[sleuth-messaging-integration]]
+== Messaging
+
+Features from this section can be disabled by setting the `spring.sleuth.messaging.enabled` property with value equal to `false`.
+
+[[sleuth-messaging-spring-integration-integration]]
+=== Spring Integration
+
+This feature is available for all tracer implementations.
+
+Spring Cloud Sleuth integrates with https://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`.
+
+You can provide the `spring.sleuth.integration.patterns` pattern to explicitly provide the names of channels that you want to include for tracing.
+By default, all channels but `hystrixStreamOutput` channel are included.
+
+IMPORTANT: When using the `Executor` to build a Spring Integration `IntegrationFlow`, you must use the untraced version of the `Executor`.
+Decorating the Spring Integration Executor Channel with `TraceableExecutorService` causes the spans to be improperly closed.
+
+If you want to customize the way tracing context is read from and written to message headers, it's enough for you to register beans of types:
+
+* `Propagator.Setter` - for writing headers to the message
+* `Propagator.Getter` - for reading headers from the message
+
+[[sleuth-messaging-spring-integration-customization]]
+==== Spring Integration Customization
+
+==== Customizing messaging spans
+
+In order to change the default span names and tags, just register a bean of type `MessageSpanCustomizer`. You can also
+override the existing `DefaultMessageSpanCustomizer` to extend the existing behaviour.
+
+[source,java]
+----
+@Component
+include::{common_tests_path}/src/main/java/org/springframework/cloud/sleuth/instrument/messaging/TracingChannelInterceptorTest.java[tags=message_span_customizer,indent=2]
+----
+
+[[sleuth-messaging-spring-cloud-function-integration]]
+=== Spring Cloud Function and Spring Cloud Stream
+
+This feature is available for all tracer implementations.
+
+Spring Cloud Sleuth can instrument Spring Cloud Function.
+The way to achieve it is to provide a `Function` or `Consumer` or `Supplier` that takes in a `Message` as a parameter e.g. `Function, Message>`.
+If the type is not `Message` then instrumentation will not take place.
+Out of the box instrumentation will not take place when dealing with Reactor based streams - e.g. `Function>, Flux>>`.
+
+Since Spring Cloud Stream reuses Spring Cloud Function, you'll get the instrumentation out of the box.
+
+You can disable this behavior by setting the value of `spring.sleuth.function.enabled` to `false`.
+
+In order to work with reactive Stream functions you can leverage the `MessagingSleuthOperators` utility class that allows you to manipulate the input and output messages in order to continue the tracing context and to execute custom code within the tracing context.
+
+[source,java,indent=0]
+-----
+include::{project-root}/benchmarks/src/main/java/org/springframework/cloud/sleuth/benchmarks/app/stream/SleuthBenchmarkingStreamApplication.java[tags=simple_reactive,indent=0]
+-----
+
+[[sleuth-messaging-spring-rabbitmq-integration]]
+=== Spring RabbitMq
+
+This feature is available for Brave tracer implementation.
+
+We instrument the `RabbitTemplate` so that tracing headers get injected into the message.
+
+To block this feature, set `spring.sleuth.messaging.rabbit.enabled` to `false`.
+
+[[sleuth-messaging-spring-kafka-integration]]
+=== Spring Kafka
+
+This feature is available for Brave tracer implementation.
+
+We instrument the Spring Kafka's `ProducerFactory` and `ConsumerFactory`
+so that tracing headers get injected into the created Spring Kafka's
+`Producer` and `Consumer`.
+
+To block this feature, set `spring.sleuth.messaging.kafka.enabled` to `false`.
+
+[[sleuth-messaging-spring-kafka-streams-integration]]
+=== Spring Kafka Streams
+
+This feature is available for Brave tracer implementation.
+
+We instrument the `KafkaStreams` `KafkaClientSupplier` so that tracing headers get injected into the `Producer` and `Consumer`s. A `KafkaStreamsTracing` bean allows for further instrumentation through additional `TransformerSupplier` and
+`ProcessorSupplier` methods.
+
+To block this feature, set `spring.sleuth.messaging.kafka.streams.enabled` to `false`.
+
+[[sleuth-messaging-spring-jms-integration]]
+=== Spring JMS
+
+This feature is available for Brave tracer implementation.
+
+We instrument the `JmsTemplate` so that tracing headers get injected into the message.
+We also support `@JmsListener` annotated methods on the consumer side.
+
+To block this feature, set `spring.sleuth.messaging.jms.enabled` to `false`.
+
+IMPORTANT: We don't support baggage propagation for JMS
+
+[[sleuth-openfeign-integration]]
+== OpenFeign
+
+This feature is available for all tracer implementations.
+
+By default, Spring Cloud Sleuth provides integration with Feign through `TraceFeignClientAutoConfiguration`.
+You can disable it entirely by setting `spring.sleuth.feign.enabled` to `false`.
+If you do so, no Feign-related instrumentation take place.
+
+Part of Feign instrumentation is done through a `FeignBeanPostProcessor`.
+You can disable it by setting `spring.sleuth.feign.processor.enabled` to `false`.
+If you set it to `false`, Spring Cloud Sleuth does not instrument any of your custom Feign components.
+However, all the default instrumentation is still there.
+
+[[sleuth-opentracing-integration]]
+== OpenTracing
+
+This feature is available for all tracer implementations.
+
+Spring Cloud Sleuth is compatible with https://opentracing.io/[OpenTracing].
+If you have OpenTracing on the classpath, we automatically register the OpenTracing `Tracer` bean.
+If you wish to disable this, set `spring.sleuth.opentracing.enabled` to `false`
+
+[[sleuth-quartz-integration]]
+== Quartz
+
+This feature is available for all tracer implementations.
+
+We instrument quartz jobs by adding Job/Trigger listeners to the Quartz Scheduler.
+
+To turn off this feature, set the `spring.sleuth.quartz.enabled` property to `false`.
+
+[[sleuth-reactor-integration]]
+== Reactor
+
+This feature is available for all tracer implementations.
+
+We have the following modes of instrumenting reactor based applications that can be set via `spring.sleuth.reactor.instrumentation-type` property:
+
+* `DECORATE_QUEUES` - With the new Reactor https://github.com/reactor/reactor-core/pull/2566[queue wrapping mechanism] (Reactor 3.4.3) we're instrumenting the way threads are switched by Reactor. This should lead to feature parity with `ON_EACH` with low performance impact.
+* `DECORATE_ON_EACH` - wraps every Reactor operator in a trace representation.
+Passes the tracing context in most cases.
+This mode might lead to drastic performance degradation.
+* `DECORATE_ON_LAST` - wraps last Reactor operator in a trace representation.
+Passes the tracing context in some cases thus accessing MDC context might not work.
+This mode might lead to medium performance degradation.
+* `MANUAL` - wraps every Reactor in the least invasive way without passing of tracing context.
+It's up to the user to do it.
+
+Current default is `ON_EACH` for backward compatibility reasons, however we encourage the users to migrate to the `MANUAL` instrumentation and profit from `WebFluxSleuthOperators` and `MessagingSleuthOperators`.
+The performance improvement can be substantial.
+Example:
+
+[source,java,indent=0]
+-----
+include::{project-root}/benchmarks/src/main/java/org/springframework/cloud/sleuth/benchmarks/app/webflux/SleuthBenchmarkingSpringWebFluxApp.java[tags=simple_manual,indent=0]
+-----
+
+[[sleuth-redis-integration]]
+== Redis
+
+This feature is available for Brave tracer implementation.
+
+We set `tracing` property to Lettuce `ClientResources` instance to enable Brave tracing built in Lettuce.
+
+Spring Cloud Sleuth will provide a traced version of the `ClientResources` bean. If you have your own implementation of that bean, remember to customize the `ClientResources.Builder` with a stream of `ClientResourcesBuilderCustomizer`s like presented below:
+
+[source,java,indent=0]
+----
+ @Bean(destroyMethod = "shutdown")
+ DefaultClientResources myLettuceClientResources(ObjectProvider customizer) {
+ DefaultClientResources.Builder builder = DefaultClientResources.builder();
+ // setting up the builder manually
+ customizer.stream().forEach(c -> c.customize(builder));
+ return builder.build();
+ }
+----
+
+To disable Redis support, set the `spring.sleuth.redis.enabled` property to `false`.
+
+[[sleuth-runnablecallable-integration]]
+== Runnable and Callable
+
+This feature is available for all tracer implementations.
+
+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`:
+
+[source,java,indent=0]
+----
+include::{brave_path}/src/test/java/org/springframework/cloud/sleuth/brave/SpringCloudSleuthDocTests.java[tags=trace_runnable,indent=0]
+----
+
+The following example shows how to do so for `Callable`:
+
+[source,java,indent=0]
+----
+include::{brave_path}/src/test/java/org/springframework/cloud/sleuth/brave/SpringCloudSleuthDocTests.java[tags=trace_callable,indent=0]
+----
+
+That way, you ensure that a new span is created and closed for each execution.
+
+[[sleuth-rpc-integration]]
+== RPC
+
+This feature is available for Brave tracer implementation.
+
+Sleuth automatically configures the `RpcTracing` bean which serves as a foundation for RPC instrumentation such as gRPC or Dubbo.
+
+If a customization of client / server sampling of the RPC traces is required, just register a bean of type `brave.sampler.SamplerFunction` and name the bean `sleuthRpcClientSampler` for client sampler and
+`sleuthRpcServerSampler` for server sampler.
+
+For your convenience the `@RpcClientSampler` and `@RpcServerSampler`
+annotations can be used to inject the proper beans or to reference the bean names via their static String `NAME` fields.
+
+Ex.
+Here's a sampler that traces 100 "GetUserToken" server requests per second.
+This doesn't start new traces for requests to the health check service.
+Other requests will use the global sampling configuration.
+
+[source,java,indent=0]
+----
+@Configuration(proxyBeanMethods = false)
+ class Config {
+include::{autoconfig_path}/src/test/java/org/springframework/cloud/sleuth/autoconfig/brave/instrument/rpc/BraveRpcAutoConfigurationIntegrationTests.java[tags=custom_rpc_server_sampler,indent=2]
+}
+----
+
+For more, see https://github.com/openzipkin/brave/tree/master/instrumentation/rpc#sampling-policy
+
+[[sleuth-rpc-dubbo-integration]]
+=== Dubbo RPC support
+
+Via the integration with Brave, Spring Cloud Sleuth supports https://dubbo.apache.org/[Dubbo].
+It's enough to add the `brave-instrumentation-dubbo` dependency:
+
+[source,xml,indent=0]
+----
+
+ io.zipkin.brave
+ brave-instrumentation-dubbo
+
+----
+
+You need to also set a `dubbo.properties` file with the following contents:
+
+```properties
+dubbo.provider.filter=tracing
+dubbo.consumer.filter=tracing
+```
+
+You can read more about Brave - Dubbo integration https://github.com/openzipkin/brave/tree/master/instrumentation/dubbo-rpc[here].
+An example of Spring Cloud Sleuth and Dubbo can be found https://github.com/openzipkin/sleuth-webmvc-example/compare/add-dubbo-tracing[here].
+
+[[sleuth-rpc-grpc-integration]]
+=== gRPC
+
+Spring Cloud Sleuth provides instrumentation for https://grpc.io/[gRPC] via the Brave tracer.
+You can disable it entirely by setting `spring.sleuth.grpc.enabled` to `false`.
+
+[[sleuth-rpc-grpc-variant1-integration]]
+==== Variant 1
+
+[[sleuth-rpc-grpc-variant1-dependencies-integration]]
+===== Dependencies
+
+IMPORTANT: The gRPC integration relies on two external libraries to instrument clients and servers and both of those libraries must be on the class path to enable the instrumentation.
+
+Maven:
+
+```
+
+ io.github.lognet
+ grpc-spring-boot-starter
+
+
+ io.zipkin.brave
+ brave-instrumentation-grpc
+
+```
+
+Gradle:
+
+```
+ compile("io.github.lognet:grpc-spring-boot-starter")
+ compile("io.zipkin.brave:brave-instrumentation-grpc")
+```
+
+[[sleuth-rpc-grpc-variant1-server-integration]]
+===== Server Instrumentation
+
+Spring Cloud Sleuth leverages grpc-spring-boot-starter to register Brave's gRPC server interceptor with all services annotated with `@GRpcService`.
+
+[[sleuth-rpc-grpc-variant1-client-integration]]
+===== Client Instrumentation
+
+gRPC clients leverage a `ManagedChannelBuilder` to construct a `ManagedChannel` used to communicate to the gRPC server.
+The native `ManagedChannelBuilder` provides static methods as entry points for construction of `ManagedChannel` instances, however, this mechanism is outside the influence of the Spring application context.
+
+IMPORTANT: Spring Cloud Sleuth provides a `SpringAwareManagedChannelBuilder` that can be customized through the Spring application context and injected by gRPC clients.
+*This builder must be used when creating `ManagedChannel` instances.*
+
+Sleuth creates a `TracingManagedChannelBuilderCustomizer` which inject Brave's client interceptor into the `SpringAwareManagedChannelBuilder`.
+
+[[sleuth-rpc-grpc-variant2-integration]]
+==== Variant 2
+
+https://github.com/yidongnan/grpc-spring-boot-starter[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.
+
+[[sleuth-rxjava-integration]]
+== RxJava
+
+This feature is available for all tracer implementations.
+
+We registering a custom https://github.com/ReactiveX/RxJava/wiki/Plugins#rxjavaschedulershook[`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.
+To disable the custom `RxJavaSchedulersHook`, set the `spring.sleuth.rxjava.schedulers.hook.enabled` to `false`.
+
+You can define a list of regular expressions for thread names for which you do not want spans to be created.
+To do so, provide a comma-separated list of regular expressions in the `spring.sleuth.rxjava.schedulers.ignoredthreads` property.
+
+IMPORTANT: The suggested approach to reactive programming and Sleuth is to use the Reactor support.
+
+[[sleuth-circuitbreaker-integration]]
+== Spring Cloud CircuitBreaker
+
+This feature is available for all tracer implementations.
+
+If you have Spring Cloud CircuitBreaker on the classpath, we will wrap the passed command `Supplier` and the fallback `Function` in its trace representations. We will also instrument the reactive implementation of the CircuitBreaker.
+In order to disable this instrumentation set `spring.sleuth.circuitbreaker.enabled` to `false`.
+
+[[sleuth-config-server-integration]]
+== Spring Cloud Config Server
+
+This feature is available for all tracer implementations.
+
+If you have Spring Cloud Config Server running on the classpath, we will wrap the `EnvironmentRepository` in a span.
+In order to disable this instrumentation set `spring.sleuth.config.server.enabled` to `false`.
+
+[[sleuth-deployer-integration]]
+== Spring Cloud Deployer
+
+This feature is available for all tracer implementations.
+
+If you have Spring Cloud Deployer running on the classpath, we wrap the `AppDeployer` in a trace representation. We are polling the application for its status at a default interval. You can change that default by setting the `spring.sleuth.deployer.status-poll-delay` property.
+In order to disable this instrumentation set `spring.sleuth.deployer.enabled` to `false`.
+
+[[sleuth-rsocket-integration]]
+== Spring RSocket
+
+This feature is available for all tracer implementations.
+
+If you have Spring RSocket running on the classpath, we wrap the inbound and outbound communication to propagate the tracing context via the metadata.
+In order to disable this instrumentation set `spring.sleuth.rsocket.enabled` to `false`.
+
+[[sleuth-batch-integration]]
+== Spring Batch
+
+This feature is available for all tracer implementations.
+
+If you have Spring Batch running on the classpath, we wrap the `StepBuilderFactory` and the `JobBuilderFactory` to propagate the tracing context.
+In order to disable this instrumentation set `spring.sleuth.batch.enabled` to `false`.
+
+[[sleuth-tx-integration]]
+== Spring Tx
+
+This feature is available for all tracer implementations.
+
+If you have Spring Tx on the classpath we will instrument the `PlatformTransactionManager` and the `ReactiveTransactionManager` to create a span whenever a new transaction is created.
+In order to disable this instrumentation set `spring.sleuth.tx.enabled` to `false`.
+
+[[sleuth-r2dbc-integration]]
+== R2DBC
+
+This feature is available for all tracer implementations.
+
+If you have R2DBC Proxy on the classpath we will instrument the `ConnectionFactory`so that it contains a custom `ProxyExecutionListener`.
+In order to disable this instrumentation set `spring.sleuth.r2dbc.enabled` to `false`.
+
+[[sleuth-vault-integration]]
+== Spring Vault
+
+This feature is available for all tracer implementations.
+
+We're instrumenting the `RestTemplate` or `WebClient` instances used by Spring Vault to communicate with Vault.
+In order to disable this instrumentation set `spring.sleuth.vault.enabled` to `false`.
+
+[[sleuth-tomcat-integration]]
+== Spring Tomcat
+
+This feature is available for all tracer implementations.
+
+We're adding an instrumented Tomcat's `Valve` that originates the span.
+In order to disable this instrumentation set `spring.sleuth.web.tomcat.enabled` to `false`.
+
+[[sleuth-cassandra-integration]]
+== Spring Data Cassandra
+
+This feature is available for all tracer implementations.
+
+We're instrumenting Casandra's `CqlSession` and `ReactiveSession` interfaces and we're providing our own implementation of the `RequestTracker`.
+In order to disable this instrumentation set `spring.sleuth.cassandra.enabled` to `false`.
+
+[[sleuth-jdbc-integration]]
+== Spring JDBC
+
+This feature is available for all tracer implementations. It has been ported from the https://github.com/gavlyukovskiy/spring-boot-data-source-decorator/[spring-boot-datasource-decorator] project.
+
+We're decorating `DataSource`s in a trace representation. We delegate actual proxying to either https://github.com/p6spy/p6spy[p6spy] or https://github.com/ttddyy/datasource-proxy[datasource-proxy]. In order to use this feature you need to have them on the classpath.
+
+====
+[source,xml,indent=0,subs="verbatim,attributes",role="primary"]
+.P6Spy Maven
+----
+
+ p6spy
+ p6spy
+ ${p6spy.version}
+ runtime
+
+----
+
+[source,yml,indent=0,subs="verbatim,attributes",role="secondary"]
+.P6Spy Gradle
+----
+runtimeOnly "p6spy:p6spy:${p6spyVersion}"
+----
+
+[source,xml,indent=0,subs="verbatim,attributes",role="secondary"]
+.Datasource Proxy Maven
+----
+
+ net.ttddyy
+ datasource-proxy
+ ${datasource-proxy.version}
+ runtime
+
+----
+
+[source,groovy,indent=0,subs="verbatim,attributes",role="secondary"]
+.Datasource Proxy Gradle
+----
+runtimeOnly "net.ttddyy:datasource-proxy:${datasourceProxyVersion}"
+----
+====
+
+Please check the <> page under `spring.sleuth.jdbc.p6spy` for all p6spy configuration options and `spring.sleuth.jdbc.datasource-proxy` for all datasource proxy configuration options.
+
+You can configure P6Spy manually using one of available configuration methods. For more information please refer to the http://p6spy.readthedocs.io/en/latest/configandusage.html[P6Spy Configuration Guide].
+
+By default logging queries will be disabled, set `spring.sleuth.jdbc.datasource-proxy.slow-query.enable-logging` to `true` to enable logging slow queries
+and set `spring.sleuth.jdbc.datasource-proxy.query.enable-logging` to `true` to enable logging all queries.
+
+In order to disable this instrumentation set `spring.sleuth.jdbc.enabled` to `false`.
+
+[[sleuth-session-integration]]
+== Spring Session
+
+This feature is available for all tracer implementations.
+
+We're instrumenting the `Session` repositories that wraps all operations in a span.
+In order to disable this instrumentation set `spring.sleuth.session.enabled` to `false`.
+
+[[sleuth-kotlin-integration]]
+== Kotlin Coroutines
+
+This feature is available for all tracer implementations.
+
+We're adding Kotlin Coroutines that allow you to retrieve the current span via the `Tracer` bean. You can either pass the bean to the Kotlin Coroutine context via `Tracer.asContextElement()` method execution or if you have Reactor Kotlin Coroutine integration on the classpath, we will retrieve it from Reactor's context. To retrieve the current span you can call the `currentSpan()` method within the Kotlin Coroutine.
diff --git a/docs/src/main/asciidoc/project-features.adoc b/docs/src/main/asciidoc/project-features.adoc
index f871283cd..e5e8da943 100644
--- a/docs/src/main/asciidoc/project-features.adoc
+++ b/docs/src/main/asciidoc/project-features.adoc
@@ -1,506 +1,506 @@
-[[features]]
-[[project-features]]
-= Spring Cloud Sleuth Features
-
-include::_attributes.adoc[]
-
-This section dives into the details of {project-full-name}.
-Here you can learn about the key features that you may want to use and customize.
-If you have not already done so, you might want to read the "<>" and "<>" sections, so that you have a good grounding in the basics.
-
-[[features-context-propagation]]
-== Context Propagation
-
-Traces connect from service to service using header propagation.
-The default format is https://github.com/openzipkin/b3-propagation[B3].
-Similar to data formats, you can configure alternate header formats also, provided trace and span IDs are compatible with B3. Most notably, this means the trace ID and span IDs are lower-case hex, not UUIDs.
-Besides trace identifiers, other properties (Baggage) can also be passed along with the request.
-Remote Baggage must be predefined, but is flexible otherwise.
-
-To use the provided defaults you can set the `spring.sleuth.propagation.type` property.
-The value can be a list in which case you will propagate more tracing headers.
-
-For Brave we support `AWS`, `B3`, `W3C` propagation types.
-
-You can read more about how to provide custom context propagation in this "<>".
-
-[[features-sampling]]
-== Sampling
-
-Spring Cloud Sleuth pushes the sampling decision down to the tracer implementation.
-However, there are cases where you can change the sampling decision at runtime.
-
-One of such cases is skip reporting of certain client spans.
-To achieve that you can set the `spring.sleuth.web.client.skip-pattern` with the path patterns to be skipped.
-Another option is to provide your own custom `org.springframework.cloud.sleuth.SamplerFunction<`org.springframework.cloud.sleuth.http.HttpRequest>` implementation and define when a given `HttpRequest` should not be sampled.
-
-[[features-baggage]]
-== Baggage
-
-Distributed tracing works by propagating fields inside and across services that connect the trace together: traceId and spanId notably.
-The context that holds these fields can optionally push other fields that need to be consistent regardless of many services are touched.
-The simple name for these extra fields is "Baggage".
-
-Sleuth allows you to define which baggage are permitted to exist in the trace context, including what header names are used.
-
-The following example shows setting baggage values using Spring Cloud Sleuth's API:
-
-[source,java,indent=0]
-----
-include::{common_tests_path}/src/main/java/org/springframework/cloud/sleuth/baggage/multiple/MultipleHopsIntegrationTests.java[tags=baggage,indent=0]
-----
-
-IMPORTANT: There is currently no limitation of the count or size of baggage items.
-Keep in mind that too many can decrease system throughput or increase RPC latency.
-In extreme cases, too much baggage can crash the application, due to exceeding transport-level message or header capacity.
-
-You can use properties to define fields that have no special configuration such as name mapping:
-
-* `spring.sleuth.baggage.remote-fields` is a list of header names to accept and propagate to remote services.
-* `spring.sleuth.baggage.local-fields` is a list of names to propagate locally
-
-No prefixing applies with these keys.
-What you set is literally what is used.
-
-A name set in either of these properties will result in a `Baggage` of the same name.
-
-In order to automatically set the baggage values to Slf4j's MDC, you have to set the `spring.sleuth.baggage.correlation-fields` property with a list of allowed local or remote keys. E.g. `spring.sleuth.baggage.correlation-fields=country-code` will set the value of the `country-code` baggage into MDC.
-
-Note that the extra field is propagated and added to MDC starting with the next downstream trace context.
-To immediately add the extra field to MDC in the current trace context, configure the field to flush on update:
-
-```
-// configuration
-@Bean
-BaggageField countryCodeField() {
- return BaggageField.create("country-code");
-}
-
-@Bean
-ScopeDecorator mdcScopeDecorator() {
- return MDCScopeDecorator.newBuilder()
- .clear()
- .add(SingleCorrelationField.newBuilder(countryCodeField())
- .flushOnUpdate()
- .build())
- .build();
-}
-
-// service
-@Autowired
-BaggageField countryCodeField;
-
-countryCodeField.updateValue("new-value");
-```
-
-IMPORTANT: Remember that adding entries to MDC can drastically decrease the performance of your application!
-
-If you want to add the baggage entries as tags, to make it possible to search for spans via the baggage entries, you can set the value of
-`spring.sleuth.baggage.tag-fields` with a list of allowed baggage keys.
-To disable the feature you have to pass the `spring.sleuth.propagation.tag.enabled=false` property.
-
-[[features-baggage-vs-tags]]
-=== Baggage versus Tags
-
-Like trace IDs, Baggage is attached to messages or requests, usually as headers.
-Tags are key value pairs sent in a Span to Zipkin.
-Baggage values are not added spans by default, which means you can't search based on Baggage unless you opt-in.
-
-To make baggage also tags, use the property `spring.sleuth.baggage.tag-fields`
-like so:
-
-[source,yml]
-----
-include::{brave_path}/src/test/resources/application-baggage.yml[indent=0]
-----
-
-[[features-brave]]
-== OpenZipkin Brave Tracer Integration
-
-Spring Cloud Sleuth integrates with the OpenZipkin Brave tracer via the bridge that is available in the `spring-cloud-sleuth-brave` module.
-In this section you can read about specific Brave integrations.
-
-You can choose to use either Sleuth's API or the Brave API directly in your code (e.g. either Sleuth's `Tracer` or Brave's `Tracer`).
-If you want to use this tracer implementation's API directly please read https://github.com/openzipkin/brave[their documentation to learn more about it].
-
-[[features-brave-basics]]
-=== Brave Basics
-
-Here are the most core types you might use:
-
-* `brave.SpanCustomizer` - to change the span currently in progress
-* `brave.Tracer` - to get a start new spans ad-hoc
-
-Here are the most relevant links from the OpenZipkin Brave project:
-
-* https://github.com/openzipkin/brave/tree/master/brave[Brave's core library]
-* https://github.com/openzipkin/brave/tree/master/brave#baggage[Baggage (propagated fields)]
-* https://github.com/openzipkin/brave/tree/master/instrumentation/http[HTTP tracing]
-
-[[features-brave-sampling]]
-=== Brave Sampling
-
-Sampling only applies to tracing backends, such as Zipkin.
-Trace IDs appear in logs regardless of sample rate.
-Sampling is a way to prevent overloading the system, by consistently tracing some, but not all requests.
-
-The default rate of 10 traces per second is controlled by the `spring.sleuth.sampler.rate`
-property and applies when we know Sleuth is used for reasons besides logging.
-Use a rate above 100 traces per second with extreme caution as it can overload your tracing system.
-
-The sampler can be set by Java Config also, as shown in the following example:
-
-[source,java,indent=0]
-----
-include::{brave_path}/src/test/java/org/springframework/cloud/sleuth/brave/SpringCloudSleuthDocTests.java[tags=always_sampler,indent=0]
-----
-
-TIP: You can set the HTTP header `b3` to `1`, or, when doing messaging, you can set the `spanFlags` header to `1`.
-Doing so forces the current request to be sampled regardless of configuration.
-
-By default samplers will work with the refresh scope mechanism.
-That means that you can change the sampling properties at runtime, refresh the application and the changes will be reflected.
-However, sometimes the fact of creating a proxy around samplers and calling it from too early (from `@PostConstruct` annotated method) may lead to dead locks.
-In such a case either create a sampler bean explicitly, or set the property `spring.sleuth.sampler.refresh.enabled` to `false` to disable the refresh scope support.
-
-[[features-brave-baggage]]
-=== Brave Baggage 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.
-
-* `BaggagePropagationCustomizer` sets up baggage fields
-* Add a `SingleBaggageField` to control header names for a `Baggage`.
-* `CorrelationScopeCustomizer` sets up MDC fields
-* Add a `SingleCorrelationField` to change the MDC name of a `Baggage` or if updates flush.
-
-[[features-brave-customizations]]
-=== Brave Customizations
-
-The `brave.Tracer` object is fully managed by sleuth, so you rarely need to affect it.
-That said, Sleuth supports a number of `Customizer` types, that allow you to configure anything not already done by Sleuth with auto-configuration or properties.
-
-If you define one of the following as a `Bean`, Sleuth will invoke it to customize behaviour:
-
-* `RpcTracingCustomizer` - for RPC tagging and sampling policy
-* `HttpTracingCustomizer` - for HTTP tagging and sampling policy
-* `MessagingTracingCustomizer` - for messaging tagging and sampling policy
-* `CurrentTraceContextCustomizer` - to integrate decorators such as correlation.
-* `BaggagePropagationCustomizer` - for propagating baggage fields in process and over headers
-* `CorrelationScopeDecoratorCustomizer` - for scope decorations such as MDC (logging) field correlation
-
-[[features-brave-sampling-customizations]]
-==== Brave Sampling Customizations
-
-If client /server sampling is required, just register a bean of type
-`brave.sampler.SamplerFunction` and name the bean
-`sleuthHttpClientSampler` for client sampler and `sleuthHttpServerSampler`
-for server sampler.
-
-For your convenience the `@HttpClientSampler` and `@HttpServerSampler`
-annotations can be used to inject the proper beans or to reference the bean names via their static String `NAME` fields.
-
-Check out Brave's code to see an example of how to make a path-based sampler
-https://github.com/openzipkin/brave/tree/master/instrumentation/http#sampling-policy
-
-If you want to completely rewrite the `HttpTracing` bean you can use the `SkipPatternProvider`
-interface to retrieve the URL `Pattern` for spans that should be not sampled.
-Below you can see an example of usage of `SkipPatternProvider` inside a server side, `Sampler`.
-
-[source,java,indent=0]
-----
-@Configuration(proxyBeanMethods = false)
- class Config {
-include::{tests_path}/brave/spring-cloud-sleuth-instrumentation-mvc-tests/src/test/java/org/springframework/cloud/sleuth/brave/instrument/web/TraceFilterWebIntegrationTests.java[tags=custom_server_sampler,indent=2]
-}
-----
-
-[[features-brave-messaging]]
-=== Brave Messaging
-
-Sleuth automatically configures the `MessagingTracing` bean which serves as a foundation for Messaging instrumentation such as Kafka or JMS.
-
-If a customization of producer / consumer sampling of messaging traces is required, just register a bean of type `brave.sampler.SamplerFunction` and name the bean `sleuthProducerSampler` for producer sampler and `sleuthConsumerSampler`
-for consumer sampler.
-
-For your convenience the `@ProducerSampler` and `@ConsumerSampler`
-annotations can be used to inject the proper beans or to reference the bean names via their static String `NAME` fields.
-
-Ex.
-Here's a sampler that traces 100 consumer requests per second, except for the "alerts" channel.
-Other requests will use a global rate provided by the
-`Tracing` component.
-
-[source,java,indent=0]
-----
-@Configuration(proxyBeanMethods = false)
- class Config {
-include::{autoconfig_path}/src/test/java/org/springframework/cloud/sleuth/autoconfig/brave/instrument/messaging/BraveMessagingAutoConfigurationIntegrationTests.java[tags=custom_messaging_consumer_sampler,indent=2]
-}
-----
-
-For more, see https://github.com/openzipkin/brave/tree/master/instrumentation/messaging#sampling-policy
-
-[[features-brave-opentracing]]
-=== Brave Opentracing
-
-You can integrate with Brave and https://opentracing.io/[OpenTracing] via the
-`io.opentracing.brave:brave-opentracing` bridge.
-Just add it to the classpath and the OpenTracing `Tracer` will be set up automatically.
-
-[[features-zipkin]]
-== Sending Spans to Zipkin
-
-Spring Cloud Sleuth provides various integrations with the https://zipkin.io[OpenZipkin] distributed tracing system.
-Regardless of the chosen tracer implementation it's enough to add `spring-cloud-sleuth-zipkin` to the classpath to start sending spans to Zipkin.
-You can choose whether to do that via HTTP or messaging.
-You can read more about how to do that in "<>".
-
-When the span is closed, it is sent to Zipkin over HTTP. The communication is asynchronous.
-You can configure the URL by setting the `spring.zipkin.baseUrl` property, as follows:
-
-[source,yaml]
-----
-spring.zipkin.baseUrl: https://192.168.99.100:9411/
-----
-
-If you want to find Zipkin through service discovery, you can pass the Zipkin's service ID inside the URL, as shown in the following example for `zipkinserver` service ID:
-
-[source,yaml]
-----
-spring.zipkin.baseUrl: https://zipkinserver/
-----
-
-To disable this feature just set `spring.zipkin.discovery-client-enabled` to `false`.
-
-When the Discovery Client feature is enabled, Sleuth uses
-`LoadBalancerClient` to find the URL of the Zipkin Server.
-It means that you can set up the load balancing configuration.
-
-If you have `web`, `rabbit`, `activemq` or `kafka` together on the classpath, you might need to pick the means by which you would like to send spans to zipkin.
-To do so, set `web`, `rabbit`, `activemq` or `kafka` to the `spring.zipkin.sender.type` property.
-The following example shows setting the sender type for `web`:
-
-[source,yaml]
-----
-spring.zipkin.sender.type: web
-----
-
-To customize the `RestTemplate` that sends spans to Zipkin via HTTP, you can register the `ZipkinRestTemplateCustomizer` bean.
-
-[source,java,indent=0]
-----
-@Configuration(proxyBeanMethods = false)
- class MyConfig {
- @Bean ZipkinRestTemplateCustomizer myCustomizer() {
- return new ZipkinRestTemplateCustomizer() {
- @Override
- void customize(RestTemplate restTemplate) {
- // customize the RestTemplate
- }
- };
- }
-}
-----
-
-If, however, you would like to control the full process of creating the `RestTemplate`
-object, you will have to create a bean of `ZipkinRestTemplateProvider` type.
-
-[source,java,indent=0]
-----
- @Bean
- ZipkinRestTemplateProvider myZipkinRestTemplateProvider() {
- return MyRestTemplate::new;
- }
-----
-
-By default, api path will be set to `api/v2/spans` or `api/v1/spans` depending on the encoder version. If you want to use a custom api path, you can configure it using the following property (empty case, set ""):
-
-[source,yaml]
-----
-spring.zipkin.api-path: v2/path2
-----
-
-[[features-zipkin-custom-service-name]]
-=== 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.
-There are situations in which you want to explicitly provide a different service name for all spans coming from your application.
-To achieve that, you can pass the following property to your application to override that value (the example is for a service named `myService`):
-
-[source,yaml]
-----
-spring.zipkin.service.name: myService
-----
-
-[[features-zipkin-host-locator]]
-=== Host Locator
-
-IMPORTANT: This section is about defining *host* from service discovery.
-It is *NOT* about finding Zipkin through service discovery.
-
-To define the host that corresponds to a particular span, we need to resolve the host name and port.
-The default approach is to take these values from server properties.
-If those are not set, we try to retrieve the host name from the network interfaces.
-
-If you have the discovery client enabled and prefer to retrieve the host address from the registered instance in a service registry, you have to set the `spring.zipkin.locator.discovery.enabled` property (it is applicable for both HTTP-based and Stream-based span reporting), as follows:
-
-[source,yaml]
-----
-spring.zipkin.locator.discovery.enabled: true
-----
-
-[[features-zipkin-custom-reported-spans]]
-=== Customization of Reported Spans
-
-In Sleuth, we generate spans with a fixed name.
-Some users want to modify the name depending on values of tags.
-
-Sleuth registers a `SpanFilter` bean that can automatically skip reporting spans of given name patterns.
-The property `spring.sleuth.span-filter.span-name-patterns-to-skip` contains the default skip patterns for span names.
-The property `spring.sleuth.span-filter.additional-span-name-patterns-to-skip` will append the provided span name patterns to the existing ones.
-In order to disable this functionality just set `spring.sleuth.span-filter.enabled` to `false`.
-
-[[features-zipkin-custom-reported-spans-brave]]
-==== Brave Customization of Reported Spans
-
-IMPORTANT: This section is applicable for Brave tracer only.
-
-Before reporting spans (for example, to Zipkin) you may want to modify that span in some way.
-You can do so by implementing a `SpanHandler`.
-
-The following example shows how to register two beans that implement `SpanHandler`:
-
-[source,java,indent=0]
-----
-include::{autoconfig_path}/src/test/java/org/springframework/cloud/sleuth/autoconfig/brave/SpanHandlerTests.java[tags=spanHandler,indent=0]
-----
-
-The preceding example results in changing the name of the reported span to `foo bar`, just before it gets reported (for example, to 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` and `Sender`.
-If you want to override the provided beans you need to give them a specific name.
-To do this you can use respectively `ZipkinAutoConfiguration.REPORTER_BEAN_NAME` and `ZipkinAutoConfiguration.SENDER_BEAN_NAME`.
-
-[source,java,indent=0]
-----
-include::{common_tests_path}/src/main/java/org/springframework/cloud/sleuth/autoconfig/zipkin2/ZipkinAutoConfigurationTests.java[tags=override_default_beans,indent=0]
-----
-
-[[features-log-integration]]
-== Log integration
-
-Sleuth configures the logging context with variables including the service name (`%{spring.zipkin.service.name}` or `%{spring.application.name}` if the previous one was not set), span ID (`%{spanId}`) and the trace ID (`%{traceId}`).
-These help you connect logs with distributed traces and allow you choice in what tools you use to troubleshoot your services.
-
-Once you find any log with an error, you can look for the trace ID in the message.
-Paste that into your distributed tracing system to visualize the entire trace, regardless of how many services the first request ended up hitting.
-
-[source]
-----
-backend.log: 2020-04-09 17:45:40.516 ERROR [backend,5e8eeec48b08e26882aba313eb08f0a4,dcc1df555b5777b3] 97203 --- [nio-9000-exec-1] o.s.c.s.i.web.ExceptionLoggingFilter : Uncaught exception thrown
-frontend.log:2020-04-09 17:45:40.574 ERROR [frontend,5e8eeec48b08e26882aba313eb08f0a4,82aba313eb08f0a4] 97192 --- [nio-8081-exec-2] o.s.c.s.i.web.ExceptionLoggingFilter : Uncaught exception thrown
-----
-
-Above, you'll notice the trace ID is `5e8eeec48b08e26882aba313eb08f0a4`, for example.
-This log configuration was automatically setup by Sleuth.
-You can disable it by disabling Sleuth via `spring.sleuth.enabled=false` property or putting your own `logging.pattern.level` property.
-
-If you use a log aggregating tool (such as https://www.elastic.co/products/kibana[Kibana], https://www.splunk.com/[Splunk], and others), you can order the events that took place.
-An example from Kibana would resemble the following image:
-
-image::{github-raw}/docs/src/main/asciidoc/images/kibana.png[Log correlation with Kibana]
-
-If you want to use https://www.elastic.co/guide/en/logstash/current/index.html[Logstash], the following listing shows the Grok pattern for Logstash:
-
-[source]
-----
-filter {
- # pattern matching logback pattern
- grok {
- match => { "message" => "%{TIMESTAMP_ISO8601:timestamp}\s+%{LOGLEVEL:severity}\s+\[%{DATA:service},%{DATA:trace},%{DATA:span}\]\s+%{DATA:pid}\s+---\s+\[%{DATA:thread}\]\s+%{DATA:class}\s+:\s+%{GREEDYDATA:rest}" }
- }
- date {
- match => ["timestamp", "ISO8601"]
- }
- mutate {
- remove_field => ["timestamp"]
- }
-}
-----
-
-NOTE: If you want to use Grok together with the logs from Cloud Foundry, you have to use the following pattern:
-
-[source]
-----
-filter {
- # pattern matching logback pattern
- grok {
- match => { "message" => "(?m)OUT\s+%{TIMESTAMP_ISO8601:timestamp}\s+%{LOGLEVEL:severity}\s+\[%{DATA:service},%{DATA:trace},%{DATA:span}\]\s+%{DATA:pid}\s+---\s+\[%{DATA:thread}\]\s+%{DATA:class}\s+:\s+%{GREEDYDATA:rest}" }
- }
- date {
- match => ["timestamp", "ISO8601"]
- }
- mutate {
- remove_field => ["timestamp"]
- }
-}
-----
-
-[[features-log-integration-json-logback]]
-=== JSON Logback with Logstash
-
-Often, you do not want to store your logs in a text file but in a JSON file that Logstash can immediately pick.
-To do so, you have to do the following (for readability, we pass the dependencies in the `groupId:artifactId:version` notation).
-
-*Dependencies Setup*
-
-. Ensure that Logback is on the classpath (`ch.qos.logback:logback-core`).
-. Add Logstash Logback encode.
-For example, to use version `4.6`, add `net.logstash.logback:logstash-logback-encoder:4.6`.
-
-*Logback Setup*
-
-Consider the following example of a Logback configuration file (logback-spring.xml).
-
-[source,xml]
------
-include::{project-root}/docs/src/main/asciidoc/logback-spring.xml[]
------
-
-That Logback configuration file:
-
-* Logs information from the application in a JSON format to a `build/${spring.application.name}.json` file.
-* Has commented out two additional appenders: console and standard log file.
-* Has the same logging pattern as the one presented in the previous section.
-
-NOTE: If you use a custom `logback-spring.xml`, you must pass the `spring.application.name` in the `bootstrap` rather than the `application` property file.
-Otherwise, your custom logback file does not properly read the property.
-
-[[features-self-documenting-spans]]
-== Self Documenting Spans
-
-A declarative format of representing span configuration was introduced via the `DocumentedSpan` abstraction. By analyzing Sleuth's source code an appendix with all span characteristics is created (including allowed tag keys and event names). You can check the <> for more information.
-
-[[features-traces-actuator]]
-== Traces Actuator Endpoint
-
-Spring Cloud Sleuth comes with a `traces` Actuator endpoint that can store finished spans. The endpoint can be queried either via an HTTP Get method to simply retrieve the list of stored spans or via HTTP Post method to retrieve the list and clear it.
-
-The size of the queue where the spans are stored can be configured via the `management.endpoint.traces.queue-size` property.
-
-Please read the https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#actuator[Spring Boot Actuator: Production-ready Features] section of the documentation to read more about the Actuator endpoints configuration options.
-
-[[features-whats-next]]
-== What to Read Next
-
-If you want to learn more about any of the classes discussed in this section, you can browse the
-{github-code}[source code directly].
-If you have specific questions, see the
-<> section.
-
-If you are comfortable with {project-full-name}'s core features, you can continue on and read about
-<>.
+[[features]]
+[[project-features]]
+= Spring Cloud Sleuth Features
+
+include::_attributes.adoc[]
+
+This section dives into the details of {project-full-name}.
+Here you can learn about the key features that you may want to use and customize.
+If you have not already done so, you might want to read the "<>" and "<>" sections, so that you have a good grounding in the basics.
+
+[[features-context-propagation]]
+== Context Propagation
+
+Traces connect from service to service using header propagation.
+The default format is https://github.com/openzipkin/b3-propagation[B3].
+Similar to data formats, you can configure alternate header formats also, provided trace and span IDs are compatible with B3. Most notably, this means the trace ID and span IDs are lower-case hex, not UUIDs.
+Besides trace identifiers, other properties (Baggage) can also be passed along with the request.
+Remote Baggage must be predefined, but is flexible otherwise.
+
+To use the provided defaults you can set the `spring.sleuth.propagation.type` property.
+The value can be a list in which case you will propagate more tracing headers.
+
+For Brave we support `AWS`, `B3`, `W3C` propagation types.
+
+You can read more about how to provide custom context propagation in this "<>".
+
+[[features-sampling]]
+== Sampling
+
+Spring Cloud Sleuth pushes the sampling decision down to the tracer implementation.
+However, there are cases where you can change the sampling decision at runtime.
+
+One of such cases is skip reporting of certain client spans.
+To achieve that you can set the `spring.sleuth.web.client.skip-pattern` with the path patterns to be skipped.
+Another option is to provide your own custom `org.springframework.cloud.sleuth.SamplerFunction<`org.springframework.cloud.sleuth.http.HttpRequest>` implementation and define when a given `HttpRequest` should not be sampled.
+
+[[features-baggage]]
+== Baggage
+
+Distributed tracing works by propagating fields inside and across services that connect the trace together: traceId and spanId notably.
+The context that holds these fields can optionally push other fields that need to be consistent regardless of many services are touched.
+The simple name for these extra fields is "Baggage".
+
+Sleuth allows you to define which baggage are permitted to exist in the trace context, including what header names are used.
+
+The following example shows setting baggage values using Spring Cloud Sleuth's API:
+
+[source,java,indent=0]
+----
+include::{common_tests_path}/src/main/java/org/springframework/cloud/sleuth/baggage/multiple/MultipleHopsIntegrationTests.java[tags=baggage,indent=0]
+----
+
+IMPORTANT: There is currently no limitation of the count or size of baggage items.
+Keep in mind that too many can decrease system throughput or increase RPC latency.
+In extreme cases, too much baggage can crash the application, due to exceeding transport-level message or header capacity.
+
+You can use properties to define fields that have no special configuration such as name mapping:
+
+* `spring.sleuth.baggage.remote-fields` is a list of header names to accept and propagate to remote services.
+* `spring.sleuth.baggage.local-fields` is a list of names to propagate locally
+
+No prefixing applies with these keys.
+What you set is literally what is used.
+
+A name set in either of these properties will result in a `Baggage` of the same name.
+
+In order to automatically set the baggage values to Slf4j's MDC, you have to set the `spring.sleuth.baggage.correlation-fields` property with a list of allowed local or remote keys. E.g. `spring.sleuth.baggage.correlation-fields=country-code` will set the value of the `country-code` baggage into MDC.
+
+Note that the extra field is propagated and added to MDC starting with the next downstream trace context.
+To immediately add the extra field to MDC in the current trace context, configure the field to flush on update:
+
+```
+// configuration
+@Bean
+BaggageField countryCodeField() {
+ return BaggageField.create("country-code");
+}
+
+@Bean
+ScopeDecorator mdcScopeDecorator() {
+ return MDCScopeDecorator.newBuilder()
+ .clear()
+ .add(SingleCorrelationField.newBuilder(countryCodeField())
+ .flushOnUpdate()
+ .build())
+ .build();
+}
+
+// service
+@Autowired
+BaggageField countryCodeField;
+
+countryCodeField.updateValue("new-value");
+```
+
+IMPORTANT: Remember that adding entries to MDC can drastically decrease the performance of your application!
+
+If you want to add the baggage entries as tags, to make it possible to search for spans via the baggage entries, you can set the value of
+`spring.sleuth.baggage.tag-fields` with a list of allowed baggage keys.
+To disable the feature you have to pass the `spring.sleuth.propagation.tag.enabled=false` property.
+
+[[features-baggage-vs-tags]]
+=== Baggage versus Tags
+
+Like trace IDs, Baggage is attached to messages or requests, usually as headers.
+Tags are key value pairs sent in a Span to Zipkin.
+Baggage values are not added spans by default, which means you can't search based on Baggage unless you opt-in.
+
+To make baggage also tags, use the property `spring.sleuth.baggage.tag-fields`
+like so:
+
+[source,yml]
+----
+include::{brave_path}/src/test/resources/application-baggage.yml[indent=0]
+----
+
+[[features-brave]]
+== OpenZipkin Brave Tracer Integration
+
+Spring Cloud Sleuth integrates with the OpenZipkin Brave tracer via the bridge that is available in the `spring-cloud-sleuth-brave` module.
+In this section you can read about specific Brave integrations.
+
+You can choose to use either Sleuth's API or the Brave API directly in your code (e.g. either Sleuth's `Tracer` or Brave's `Tracer`).
+If you want to use this tracer implementation's API directly please read https://github.com/openzipkin/brave[their documentation to learn more about it].
+
+[[features-brave-basics]]
+=== Brave Basics
+
+Here are the most core types you might use:
+
+* `brave.SpanCustomizer` - to change the span currently in progress
+* `brave.Tracer` - to get a start new spans ad-hoc
+
+Here are the most relevant links from the OpenZipkin Brave project:
+
+* https://github.com/openzipkin/brave/tree/master/brave[Brave's core library]
+* https://github.com/openzipkin/brave/tree/master/brave#baggage[Baggage (propagated fields)]
+* https://github.com/openzipkin/brave/tree/master/instrumentation/http[HTTP tracing]
+
+[[features-brave-sampling]]
+=== Brave Sampling
+
+Sampling only applies to tracing backends, such as Zipkin.
+Trace IDs appear in logs regardless of sample rate.
+Sampling is a way to prevent overloading the system, by consistently tracing some, but not all requests.
+
+The default rate of 10 traces per second is controlled by the `spring.sleuth.sampler.rate`
+property and applies when we know Sleuth is used for reasons besides logging.
+Use a rate above 100 traces per second with extreme caution as it can overload your tracing system.
+
+The sampler can be set by Java Config also, as shown in the following example:
+
+[source,java,indent=0]
+----
+include::{brave_path}/src/test/java/org/springframework/cloud/sleuth/brave/SpringCloudSleuthDocTests.java[tags=always_sampler,indent=0]
+----
+
+TIP: You can set the HTTP header `b3` to `1`, or, when doing messaging, you can set the `spanFlags` header to `1`.
+Doing so forces the current request to be sampled regardless of configuration.
+
+By default samplers will work with the refresh scope mechanism.
+That means that you can change the sampling properties at runtime, refresh the application and the changes will be reflected.
+However, sometimes the fact of creating a proxy around samplers and calling it from too early (from `@PostConstruct` annotated method) may lead to dead locks.
+In such a case either create a sampler bean explicitly, or set the property `spring.sleuth.sampler.refresh.enabled` to `false` to disable the refresh scope support.
+
+[[features-brave-baggage]]
+=== Brave Baggage 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.
+
+* `BaggagePropagationCustomizer` sets up baggage fields
+* Add a `SingleBaggageField` to control header names for a `Baggage`.
+* `CorrelationScopeCustomizer` sets up MDC fields
+* Add a `SingleCorrelationField` to change the MDC name of a `Baggage` or if updates flush.
+
+[[features-brave-customizations]]
+=== Brave Customizations
+
+The `brave.Tracer` object is fully managed by sleuth, so you rarely need to affect it.
+That said, Sleuth supports a number of `Customizer` types, that allow you to configure anything not already done by Sleuth with auto-configuration or properties.
+
+If you define one of the following as a `Bean`, Sleuth will invoke it to customize behaviour:
+
+* `RpcTracingCustomizer` - for RPC tagging and sampling policy
+* `HttpTracingCustomizer` - for HTTP tagging and sampling policy
+* `MessagingTracingCustomizer` - for messaging tagging and sampling policy
+* `CurrentTraceContextCustomizer` - to integrate decorators such as correlation.
+* `BaggagePropagationCustomizer` - for propagating baggage fields in process and over headers
+* `CorrelationScopeDecoratorCustomizer` - for scope decorations such as MDC (logging) field correlation
+
+[[features-brave-sampling-customizations]]
+==== Brave Sampling Customizations
+
+If client /server sampling is required, just register a bean of type
+`brave.sampler.SamplerFunction` and name the bean
+`sleuthHttpClientSampler` for client sampler and `sleuthHttpServerSampler`
+for server sampler.
+
+For your convenience the `@HttpClientSampler` and `@HttpServerSampler`
+annotations can be used to inject the proper beans or to reference the bean names via their static String `NAME` fields.
+
+Check out Brave's code to see an example of how to make a path-based sampler
+https://github.com/openzipkin/brave/tree/master/instrumentation/http#sampling-policy
+
+If you want to completely rewrite the `HttpTracing` bean you can use the `SkipPatternProvider`
+interface to retrieve the URL `Pattern` for spans that should be not sampled.
+Below you can see an example of usage of `SkipPatternProvider` inside a server side, `Sampler`.
+
+[source,java,indent=0]
+----
+@Configuration(proxyBeanMethods = false)
+ class Config {
+include::{tests_path}/brave/spring-cloud-sleuth-instrumentation-mvc-tests/src/test/java/org/springframework/cloud/sleuth/brave/instrument/web/TraceFilterWebIntegrationTests.java[tags=custom_server_sampler,indent=2]
+}
+----
+
+[[features-brave-messaging]]
+=== Brave Messaging
+
+Sleuth automatically configures the `MessagingTracing` bean which serves as a foundation for Messaging instrumentation such as Kafka or JMS.
+
+If a customization of producer / consumer sampling of messaging traces is required, just register a bean of type `brave.sampler.SamplerFunction` and name the bean `sleuthProducerSampler` for producer sampler and `sleuthConsumerSampler`
+for consumer sampler.
+
+For your convenience the `@ProducerSampler` and `@ConsumerSampler`
+annotations can be used to inject the proper beans or to reference the bean names via their static String `NAME` fields.
+
+Ex.
+Here's a sampler that traces 100 consumer requests per second, except for the "alerts" channel.
+Other requests will use a global rate provided by the
+`Tracing` component.
+
+[source,java,indent=0]
+----
+@Configuration(proxyBeanMethods = false)
+ class Config {
+include::{autoconfig_path}/src/test/java/org/springframework/cloud/sleuth/autoconfig/brave/instrument/messaging/BraveMessagingAutoConfigurationIntegrationTests.java[tags=custom_messaging_consumer_sampler,indent=2]
+}
+----
+
+For more, see https://github.com/openzipkin/brave/tree/master/instrumentation/messaging#sampling-policy
+
+[[features-brave-opentracing]]
+=== Brave Opentracing
+
+You can integrate with Brave and https://opentracing.io/[OpenTracing] via the
+`io.opentracing.brave:brave-opentracing` bridge.
+Just add it to the classpath and the OpenTracing `Tracer` will be set up automatically.
+
+[[features-zipkin]]
+== Sending Spans to Zipkin
+
+Spring Cloud Sleuth provides various integrations with the https://zipkin.io[OpenZipkin] distributed tracing system.
+Regardless of the chosen tracer implementation it's enough to add `spring-cloud-sleuth-zipkin` to the classpath to start sending spans to Zipkin.
+You can choose whether to do that via HTTP or messaging.
+You can read more about how to do that in "<>".
+
+When the span is closed, it is sent to Zipkin over HTTP. The communication is asynchronous.
+You can configure the URL by setting the `spring.zipkin.baseUrl` property, as follows:
+
+[source,yaml]
+----
+spring.zipkin.baseUrl: https://192.168.99.100:9411/
+----
+
+If you want to find Zipkin through service discovery, you can pass the Zipkin's service ID inside the URL, as shown in the following example for `zipkinserver` service ID:
+
+[source,yaml]
+----
+spring.zipkin.baseUrl: https://zipkinserver/
+----
+
+To disable this feature just set `spring.zipkin.discovery-client-enabled` to `false`.
+
+When the Discovery Client feature is enabled, Sleuth uses
+`LoadBalancerClient` to find the URL of the Zipkin Server.
+It means that you can set up the load balancing configuration.
+
+If you have `web`, `rabbit`, `activemq` or `kafka` together on the classpath, you might need to pick the means by which you would like to send spans to zipkin.
+To do so, set `web`, `rabbit`, `activemq` or `kafka` to the `spring.zipkin.sender.type` property.
+The following example shows setting the sender type for `web`:
+
+[source,yaml]
+----
+spring.zipkin.sender.type: web
+----
+
+To customize the `RestTemplate` that sends spans to Zipkin via HTTP, you can register the `ZipkinRestTemplateCustomizer` bean.
+
+[source,java,indent=0]
+----
+@Configuration(proxyBeanMethods = false)
+ class MyConfig {
+ @Bean ZipkinRestTemplateCustomizer myCustomizer() {
+ return new ZipkinRestTemplateCustomizer() {
+ @Override
+ void customize(RestTemplate restTemplate) {
+ // customize the RestTemplate
+ }
+ };
+ }
+}
+----
+
+If, however, you would like to control the full process of creating the `RestTemplate`
+object, you will have to create a bean of `ZipkinRestTemplateProvider` type.
+
+[source,java,indent=0]
+----
+ @Bean
+ ZipkinRestTemplateProvider myZipkinRestTemplateProvider() {
+ return MyRestTemplate::new;
+ }
+----
+
+By default, api path will be set to `api/v2/spans` or `api/v1/spans` depending on the encoder version. If you want to use a custom api path, you can configure it using the following property (empty case, set ""):
+
+[source,yaml]
+----
+spring.zipkin.api-path: v2/path2
+----
+
+[[features-zipkin-custom-service-name]]
+=== 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.
+There are situations in which you want to explicitly provide a different service name for all spans coming from your application.
+To achieve that, you can pass the following property to your application to override that value (the example is for a service named `myService`):
+
+[source,yaml]
+----
+spring.zipkin.service.name: myService
+----
+
+[[features-zipkin-host-locator]]
+=== Host Locator
+
+IMPORTANT: This section is about defining *host* from service discovery.
+It is *NOT* about finding Zipkin through service discovery.
+
+To define the host that corresponds to a particular span, we need to resolve the host name and port.
+The default approach is to take these values from server properties.
+If those are not set, we try to retrieve the host name from the network interfaces.
+
+If you have the discovery client enabled and prefer to retrieve the host address from the registered instance in a service registry, you have to set the `spring.zipkin.locator.discovery.enabled` property (it is applicable for both HTTP-based and Stream-based span reporting), as follows:
+
+[source,yaml]
+----
+spring.zipkin.locator.discovery.enabled: true
+----
+
+[[features-zipkin-custom-reported-spans]]
+=== Customization of Reported Spans
+
+In Sleuth, we generate spans with a fixed name.
+Some users want to modify the name depending on values of tags.
+
+Sleuth registers a `SpanFilter` bean that can automatically skip reporting spans of given name patterns.
+The property `spring.sleuth.span-filter.span-name-patterns-to-skip` contains the default skip patterns for span names.
+The property `spring.sleuth.span-filter.additional-span-name-patterns-to-skip` will append the provided span name patterns to the existing ones.
+In order to disable this functionality just set `spring.sleuth.span-filter.enabled` to `false`.
+
+[[features-zipkin-custom-reported-spans-brave]]
+==== Brave Customization of Reported Spans
+
+IMPORTANT: This section is applicable for Brave tracer only.
+
+Before reporting spans (for example, to Zipkin) you may want to modify that span in some way.
+You can do so by implementing a `SpanHandler`.
+
+The following example shows how to register two beans that implement `SpanHandler`:
+
+[source,java,indent=0]
+----
+include::{autoconfig_path}/src/test/java/org/springframework/cloud/sleuth/autoconfig/brave/SpanHandlerTests.java[tags=spanHandler,indent=0]
+----
+
+The preceding example results in changing the name of the reported span to `foo bar`, just before it gets reported (for example, to 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` and `Sender`.
+If you want to override the provided beans you need to give them a specific name.
+To do this you can use respectively `ZipkinAutoConfiguration.REPORTER_BEAN_NAME` and `ZipkinAutoConfiguration.SENDER_BEAN_NAME`.
+
+[source,java,indent=0]
+----
+include::{common_tests_path}/src/main/java/org/springframework/cloud/sleuth/autoconfig/zipkin2/ZipkinAutoConfigurationTests.java[tags=override_default_beans,indent=0]
+----
+
+[[features-log-integration]]
+== Log integration
+
+Sleuth configures the logging context with variables including the service name (`%{spring.zipkin.service.name}` or `%{spring.application.name}` if the previous one was not set), span ID (`%{spanId}`) and the trace ID (`%{traceId}`).
+These help you connect logs with distributed traces and allow you choice in what tools you use to troubleshoot your services.
+
+Once you find any log with an error, you can look for the trace ID in the message.
+Paste that into your distributed tracing system to visualize the entire trace, regardless of how many services the first request ended up hitting.
+
+[source]
+----
+backend.log: 2020-04-09 17:45:40.516 ERROR [backend,5e8eeec48b08e26882aba313eb08f0a4,dcc1df555b5777b3] 97203 --- [nio-9000-exec-1] o.s.c.s.i.web.ExceptionLoggingFilter : Uncaught exception thrown
+frontend.log:2020-04-09 17:45:40.574 ERROR [frontend,5e8eeec48b08e26882aba313eb08f0a4,82aba313eb08f0a4] 97192 --- [nio-8081-exec-2] o.s.c.s.i.web.ExceptionLoggingFilter : Uncaught exception thrown
+----
+
+Above, you'll notice the trace ID is `5e8eeec48b08e26882aba313eb08f0a4`, for example.
+This log configuration was automatically setup by Sleuth.
+You can disable it by disabling Sleuth via `spring.sleuth.enabled=false` property or putting your own `logging.pattern.level` property.
+
+If you use a log aggregating tool (such as https://www.elastic.co/products/kibana[Kibana], https://www.splunk.com/[Splunk], and others), you can order the events that took place.
+An example from Kibana would resemble the following image:
+
+image::{github-raw}/docs/src/main/asciidoc/images/kibana.png[Log correlation with Kibana]
+
+If you want to use https://www.elastic.co/guide/en/logstash/current/index.html[Logstash], the following listing shows the Grok pattern for Logstash:
+
+[source]
+----
+filter {
+ # pattern matching logback pattern
+ grok {
+ match => { "message" => "%{TIMESTAMP_ISO8601:timestamp}\s+%{LOGLEVEL:severity}\s+\[%{DATA:service},%{DATA:trace},%{DATA:span}\]\s+%{DATA:pid}\s+---\s+\[%{DATA:thread}\]\s+%{DATA:class}\s+:\s+%{GREEDYDATA:rest}" }
+ }
+ date {
+ match => ["timestamp", "ISO8601"]
+ }
+ mutate {
+ remove_field => ["timestamp"]
+ }
+}
+----
+
+NOTE: If you want to use Grok together with the logs from Cloud Foundry, you have to use the following pattern:
+
+[source]
+----
+filter {
+ # pattern matching logback pattern
+ grok {
+ match => { "message" => "(?m)OUT\s+%{TIMESTAMP_ISO8601:timestamp}\s+%{LOGLEVEL:severity}\s+\[%{DATA:service},%{DATA:trace},%{DATA:span}\]\s+%{DATA:pid}\s+---\s+\[%{DATA:thread}\]\s+%{DATA:class}\s+:\s+%{GREEDYDATA:rest}" }
+ }
+ date {
+ match => ["timestamp", "ISO8601"]
+ }
+ mutate {
+ remove_field => ["timestamp"]
+ }
+}
+----
+
+[[features-log-integration-json-logback]]
+=== JSON Logback with Logstash
+
+Often, you do not want to store your logs in a text file but in a JSON file that Logstash can immediately pick.
+To do so, you have to do the following (for readability, we pass the dependencies in the `groupId:artifactId:version` notation).
+
+*Dependencies Setup*
+
+. Ensure that Logback is on the classpath (`ch.qos.logback:logback-core`).
+. Add Logstash Logback encode.
+For example, to use version `4.6`, add `net.logstash.logback:logstash-logback-encoder:4.6`.
+
+*Logback Setup*
+
+Consider the following example of a Logback configuration file (logback-spring.xml).
+
+[source,xml]
+-----
+include::{project-root}/docs/src/main/asciidoc/logback-spring.xml[]
+-----
+
+That Logback configuration file:
+
+* Logs information from the application in a JSON format to a `build/${spring.application.name}.json` file.
+* Has commented out two additional appenders: console and standard log file.
+* Has the same logging pattern as the one presented in the previous section.
+
+NOTE: If you use a custom `logback-spring.xml`, you must pass the `spring.application.name` in the `bootstrap` rather than the `application` property file.
+Otherwise, your custom logback file does not properly read the property.
+
+[[features-self-documenting-spans]]
+== Self Documenting Spans
+
+A declarative format of representing span configuration was introduced via the `DocumentedSpan` abstraction. By analyzing Sleuth's source code an appendix with all span characteristics is created (including allowed tag keys and event names). You can check the <> for more information.
+
+[[features-traces-actuator]]
+== Traces Actuator Endpoint
+
+Spring Cloud Sleuth comes with a `traces` Actuator endpoint that can store finished spans. The endpoint can be queried either via an HTTP Get method to simply retrieve the list of stored spans or via HTTP Post method to retrieve the list and clear it.
+
+The size of the queue where the spans are stored can be configured via the `management.endpoint.traces.queue-size` property.
+
+Please read the https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#actuator[Spring Boot Actuator: Production-ready Features] section of the documentation to read more about the Actuator endpoints configuration options.
+
+[[features-whats-next]]
+== What to Read Next
+
+If you want to learn more about any of the classes discussed in this section, you can browse the
+{github-code}[source code directly].
+If you have specific questions, see the
+<> section.
+
+If you are comfortable with {project-full-name}'s core features, you can continue on and read about
+<>.
diff --git a/docs/src/main/asciidoc/spring-cloud-sleuth.adoc b/docs/src/main/asciidoc/spring-cloud-sleuth.adoc
index d34261b40..92ac1694f 100644
--- a/docs/src/main/asciidoc/spring-cloud-sleuth.adoc
+++ b/docs/src/main/asciidoc/spring-cloud-sleuth.adoc
@@ -1,18 +1,18 @@
-[[spring-cloud-sleuth-reference-documentation]]
-= Spring Cloud Sleuth Reference Documentation
-Adrian Cole, Spencer Gibb, Marcin Grzejszczak, Dave Syer, Jay Bryant
-
-:docinfo: shared
-include::_attributes.adoc[]
-
-The reference documentation consists of the following sections:
-
-[horizontal]
-<> :: Legal information.
-<> :: About the Documentation, Getting Help, First Steps, and more.
-<> :: Introducing {project-full-name}, Developing Your First {project-full-name}-based Application
-<> :: {project-full-name} usage examples and workflows.
-<> :: Span creation, context propagation, and more.
-<> :: Add sampling, propagate remote tags, and more.
-<> :: Instrumentation configuration, context propagation, and more.
-<> :: Span definitions and configuration properties.
+[[spring-cloud-sleuth-reference-documentation]]
+= Spring Cloud Sleuth Reference Documentation
+Adrian Cole, Spencer Gibb, Marcin Grzejszczak, Dave Syer, Jay Bryant
+
+:docinfo: shared
+include::_attributes.adoc[]
+
+The reference documentation consists of the following sections:
+
+[horizontal]
+<> :: Legal information.
+<> :: About the Documentation, Getting Help, First Steps, and more.
+<> :: Introducing {project-full-name}, Developing Your First {project-full-name}-based Application
+<> :: {project-full-name} usage examples and workflows.
+<> :: Span creation, context propagation, and more.
+<> :: Add sampling, propagate remote tags, and more.
+<> :: Instrumentation configuration, context propagation, and more.
+<> :: Span definitions and configuration properties.
diff --git a/docs/src/main/java/org/springframework/cloud/sleuth/documentation/SpanEntry.java b/docs/src/main/java/org/springframework/cloud/sleuth/documentation/SpanEntry.java
index b11eb31eb..fcb7d82a7 100644
--- a/docs/src/main/java/org/springframework/cloud/sleuth/documentation/SpanEntry.java
+++ b/docs/src/main/java/org/springframework/cloud/sleuth/documentation/SpanEntry.java
@@ -79,32 +79,32 @@ class SpanEntry implements Comparable {
}
@Override
- //@formatter:off
- public String toString() {
- StringBuilder text = new StringBuilder()
- .append("=== ").append(Arrays.stream(enumName.replace("_", " ").split(" ")).map(s -> StringUtils.capitalize(s.toLowerCase(Locale.ROOT))).collect(Collectors.joining(" ")))
- .append("\n\n> ").append(description).append("\n\n")
- .append("**Span name** `").append(name).append("`");
- if (name.contains("%s")) {
- text.append(" - since it contains `%s`, the name is dynamic and will be resolved at runtime.");
- }
- else {
- text.append(".");
- }
- text.append("\n\n").append("Fully qualified name of the enclosing class `").append(this.enclosingClass).append("`");
- if (StringUtils.hasText(prefix)) {
- text.append("\n\nIMPORTANT: All tags and events must be prefixed with `").append(this.prefix).append("` prefix!");
- }
- if (!tagKeys.isEmpty()) {
- text.append("\n\n.Tag Keys\n|===\n|Name | Description\n").append(this.tagKeys.stream().map(KeyValueEntry::toString).collect(Collectors.joining("\n")))
- .append("\n|===");
- }
- if (!events.isEmpty()) {
- text.append("\n\n.Event Values\n|===\n|Name | Description\n").append(this.events.stream().map(KeyValueEntry::toString).collect(Collectors.joining("\n")))
- .append("\n|===");
- }
- return text.toString();
- }
+ //@formatter:off
+ public String toString() {
+ StringBuilder text = new StringBuilder()
+ .append("=== ").append(Arrays.stream(enumName.replace("_", " ").split(" ")).map(s -> StringUtils.capitalize(s.toLowerCase(Locale.ROOT))).collect(Collectors.joining(" ")))
+ .append("\n\n> ").append(description).append("\n\n")
+ .append("**Span name** `").append(name).append("`");
+ if (name.contains("%s")) {
+ text.append(" - since it contains `%s`, the name is dynamic and will be resolved at runtime.");
+ }
+ else {
+ text.append(".");
+ }
+ text.append("\n\n").append("Fully qualified name of the enclosing class `").append(this.enclosingClass).append("`");
+ if (StringUtils.hasText(prefix)) {
+ text.append("\n\nIMPORTANT: All tags and events must be prefixed with `").append(this.prefix).append("` prefix!");
+ }
+ if (!tagKeys.isEmpty()) {
+ text.append("\n\n.Tag Keys\n|===\n|Name | Description\n").append(this.tagKeys.stream().map(KeyValueEntry::toString).collect(Collectors.joining("\n")))
+ .append("\n|===");
+ }
+ if (!events.isEmpty()) {
+ text.append("\n\n.Event Values\n|===\n|Name | Description\n").append(this.events.stream().map(KeyValueEntry::toString).collect(Collectors.joining("\n")))
+ .append("\n|===");
+ }
+ return text.toString();
+ }
//@formatter:on
}
diff --git a/spring-cloud-sleuth-autoconfigure/pom.xml b/spring-cloud-sleuth-autoconfigure/pom.xml
index aedbd9bf8..ba19af7b3 100644
--- a/spring-cloud-sleuth-autoconfigure/pom.xml
+++ b/spring-cloud-sleuth-autoconfigure/pom.xml
@@ -1,523 +1,523 @@
-
-
-
-
- 4.0.0
-
- spring-cloud-sleuth-autoconfigure
- jar
- Spring Cloud Sleuth AutoConfigure
- Spring Cloud Sleuth AutoConfigure
-
-
- org.springframework.cloud
- spring-cloud-sleuth
- 3.1.0-SNAPSHOT
- ..
-
-
-
-
-
- org.springframework.cloud
- spring-cloud-sleuth-instrumentation
-
-
- org.springframework.boot
- spring-boot-starter-web
- true
-
-
- io.micrometer
- micrometer-core
- true
-
-
- io.projectreactor
- reactor-core
- true
-
-
- org.reactivestreams
- reactive-streams
- true
-
-
- org.springframework.boot
- spring-boot-configuration-processor
- true
-
-
- org.springframework.boot
- spring-boot-starter-actuator
- true
-
-
- org.springframework.integration
- spring-integration-core
- true
-
-
- org.springframework.cloud
- spring-cloud-config-server
- true
-
-
- org.springframework.cloud
- spring-cloud-starter-config
- true
-
-
- org.springframework.cloud
- spring-cloud-function-context
- true
-
-
- org.springframework.boot
- spring-boot-starter-websocket
- true
-
-
- org.springframework.boot
- spring-boot-starter-batch
- true
-
-
- org.springframework.cloud
- spring-cloud-stream
-
- ${spring-cloud-stream.version}
- true
-
-
- org.springframework.cloud
- spring-cloud-commons
-
-
- org.springframework
- spring-context
-
-
- org.springframework.cloud
- spring-cloud-context
- true
-
-
- org.springframework.cloud
- spring-cloud-starter-task
- true
-
-
- org.springframework.boot
- spring-boot-starter-data-cassandra
- true
-
-
- org.springframework.boot
- spring-boot-starter-data-cassandra-reactive
- true
-
-
- org.springframework.cloud
- spring-cloud-deployer-spi
- true
-
-
- io.reactivex
- rxjava
- true
-
-
- io.r2dbc
- r2dbc-proxy
- true
-
-
- io.github.openfeign
- feign-okhttp
- true
-
-
- org.springframework.cloud
- spring-cloud-starter-openfeign
- true
-
-
- org.springframework.cloud
- spring-cloud-starter-loadbalancer
- true
-
-
- org.springframework.cloud
- spring-cloud-starter-gateway
- true
-
-
- org.aspectj
- aspectjrt
-
-
- org.springframework.boot
- spring-boot-starter-quartz
- true
-
-
- org.springframework.boot
- spring-boot-autoconfigure-processor
- true
-
-
- org.springframework.security.oauth
- spring-security-oauth2
- true
-
-
- org.springframework.security.oauth.boot
- spring-security-oauth2-autoconfigure
- true
-
-
- org.springframework.vault
- spring-vault-core
- true
-
-
- p6spy
- p6spy
- true
-
-
- net.ttddyy
- datasource-proxy
- true
-
-
- org.apache.commons
- commons-dbcp2
- true
-
-
- org.apache.tomcat
- tomcat-jdbc
- true
-
-
- com.zaxxer
- HikariCP
- true
-
-
- org.springframework.session
- spring-session-data-redis
- true
-
-
-
- org.springframework.cloud
- spring-cloud-sleuth-brave
- true
-
-
- io.zipkin.brave
- brave
-
-
- io.zipkin.reporter2
- *
-
-
- io.zipkin.zipkin2
- *
-
-
- true
-
-
- io.zipkin.brave
- brave-context-slf4j
- true
-
-
- io.zipkin.brave
- brave-instrumentation-messaging
- true
-
-
- io.zipkin.brave
- brave-instrumentation-rpc
- true
-
-
- io.zipkin.brave
- brave-instrumentation-spring-rabbit
- true
-
-
- io.zipkin.brave
- brave-instrumentation-kafka-clients
- true
-
-
- io.zipkin.brave
- brave-instrumentation-kafka-streams
- true
-
-
- io.zipkin.brave
- brave-instrumentation-httpclient
- true
-
-
- io.zipkin.brave
- brave-instrumentation-httpasyncclient
- true
-
-
- io.zipkin.brave
- brave-instrumentation-jms
- true
-
-
- io.zipkin.brave
- brave-instrumentation-mongodb
- true
-
-
- io.zipkin.aws
- brave-propagation-aws
- true
-
-
- javax.jms
- javax.jms-api
- true
-
-
- io.opentracing.brave
- brave-opentracing
- true
-
-
- org.apache.httpcomponents
- httpasyncclient
- true
-
-
- org.springframework
- spring-jms
- true
-
-
- io.projectreactor.kafka
- reactor-kafka
- true
-
-
-
- io.github.lognet
- grpc-spring-boot-starter
- true
-
-
- org.springframework.boot
- spring-boot-starter
-
-
-
-
- io.zipkin.brave
- brave-instrumentation-grpc
- true
-
-
- io.zipkin.reporter2
- zipkin-reporter-metrics-micrometer
-
-
- io.micrometer
- micrometer-core
-
-
- true
-
-
-
- io.lettuce
- lettuce-core
- true
-
-
- org.springframework.kafka
- spring-kafka
- true
-
-
- org.apache.kafka
- kafka-streams
- true
-
-
- org.springframework.amqp
- spring-rabbit
- true
-
-
- org.springframework.boot
- spring-boot-starter-data-mongodb
- true
-
-
- org.springframework.boot
- spring-boot-starter-rsocket
- true
-
-
-
-
- org.springframework.cloud
- spring-cloud-sleuth-zipkin
- true
-
-
- io.zipkin.zipkin2
- zipkin
- true
-
-
- io.zipkin.reporter2
- zipkin-reporter
- true
-
-
- io.zipkin.reporter2
- zipkin-reporter-brave
- true
-
-
- io.zipkin.reporter2
- zipkin-sender-kafka
- true
-
-
-
- org.apache.kafka
- kafka-clients
-
-
-
-
- io.zipkin.reporter2
- zipkin-sender-activemq-client
- true
-
-
- org.apache.activemq
- activemq-client
-
-
-
-
- org.apache.activemq
- activemq-client
- true
-
-
- io.zipkin.reporter2
- zipkin-sender-amqp-client
- true
-
-
-
- com.rabbitmq
- amqp-client
-
-
-
-
-
- org.springframework.boot
- spring-boot-starter-test
- test
-
-
- org.awaitility
- awaitility
- test
-
-
- org.mongodb
- mongodb-driver-reactivestreams
- test
-
-
-
-
- io.zipkin.brave
- brave-instrumentation-http-tests
- test
-
-
- com.squareup.okhttp3
- mockwebserver
- test
-
-
-
-
- com.squareup.okhttp3
- okhttp
-
- 4.8.0
- test
-
-
- com.tngtech.archunit
- archunit-junit5
- test
-
-
- com.h2database
- h2
- test
-
-
-
-
-
-
- fast
-
- false
-
-
-
-
- maven-surefire-plugin
-
- 4
- true
- -Xmx1024m -XX:MaxPermSize=256m
-
-
-
-
-
-
-
-
+
+
+
+
+ 4.0.0
+
+ spring-cloud-sleuth-autoconfigure
+ jar
+ Spring Cloud Sleuth AutoConfigure
+ Spring Cloud Sleuth AutoConfigure
+
+
+ org.springframework.cloud
+ spring-cloud-sleuth
+ 3.1.0-SNAPSHOT
+ ..
+
+
+
+
+
+ org.springframework.cloud
+ spring-cloud-sleuth-instrumentation
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+ true
+
+
+ io.micrometer
+ micrometer-core
+ true
+
+
+ io.projectreactor
+ reactor-core
+ true
+
+
+ org.reactivestreams
+ reactive-streams
+ true
+
+
+ org.springframework.boot
+ spring-boot-configuration-processor
+ true
+
+
+ org.springframework.boot
+ spring-boot-starter-actuator
+ true
+
+
+ org.springframework.integration
+ spring-integration-core
+ true
+
+
+ org.springframework.cloud
+ spring-cloud-config-server
+ true
+
+
+ org.springframework.cloud
+ spring-cloud-starter-config
+ true
+
+
+ org.springframework.cloud
+ spring-cloud-function-context
+ true
+
+
+ org.springframework.boot
+ spring-boot-starter-websocket
+ true
+
+
+ org.springframework.boot
+ spring-boot-starter-batch
+ true
+
+
+ org.springframework.cloud
+ spring-cloud-stream
+
+ ${spring-cloud-stream.version}
+ true
+
+
+ org.springframework.cloud
+ spring-cloud-commons
+
+
+ org.springframework
+ spring-context
+
+
+ org.springframework.cloud
+ spring-cloud-context
+ true
+
+
+ org.springframework.cloud
+ spring-cloud-starter-task
+ true
+
+
+ org.springframework.boot
+ spring-boot-starter-data-cassandra
+ true
+
+
+ org.springframework.boot
+ spring-boot-starter-data-cassandra-reactive
+ true
+
+
+ org.springframework.cloud
+ spring-cloud-deployer-spi
+ true
+
+
+ io.reactivex
+ rxjava
+ true
+
+
+ io.r2dbc
+ r2dbc-proxy
+ true
+
+
+ io.github.openfeign
+ feign-okhttp
+ true
+
+
+ org.springframework.cloud
+ spring-cloud-starter-openfeign
+ true
+
+
+ org.springframework.cloud
+ spring-cloud-starter-loadbalancer
+ true
+
+
+ org.springframework.cloud
+ spring-cloud-starter-gateway
+ true
+
+
+ org.aspectj
+ aspectjrt
+
+
+ org.springframework.boot
+ spring-boot-starter-quartz
+ true
+
+
+ org.springframework.boot
+ spring-boot-autoconfigure-processor
+ true
+
+
+ org.springframework.security.oauth
+ spring-security-oauth2
+ true
+
+
+ org.springframework.security.oauth.boot
+ spring-security-oauth2-autoconfigure
+ true
+
+
+ org.springframework.vault
+ spring-vault-core
+ true
+
+
+ p6spy
+ p6spy
+ true
+
+
+ net.ttddyy
+ datasource-proxy
+ true
+
+
+ org.apache.commons
+ commons-dbcp2
+ true
+
+
+ org.apache.tomcat
+ tomcat-jdbc
+ true
+
+
+ com.zaxxer
+ HikariCP
+ true
+
+
+ org.springframework.session
+ spring-session-data-redis
+ true
+
+
+
+ org.springframework.cloud
+ spring-cloud-sleuth-brave
+ true
+
+
+ io.zipkin.brave
+ brave
+
+
+ io.zipkin.reporter2
+ *
+
+
+ io.zipkin.zipkin2
+ *
+
+
+ true
+
+
+ io.zipkin.brave
+ brave-context-slf4j
+ true
+
+
+ io.zipkin.brave
+ brave-instrumentation-messaging
+ true
+
+
+ io.zipkin.brave
+ brave-instrumentation-rpc
+ true
+
+
+ io.zipkin.brave
+ brave-instrumentation-spring-rabbit
+ true
+
+
+ io.zipkin.brave
+ brave-instrumentation-kafka-clients
+ true
+
+
+ io.zipkin.brave
+ brave-instrumentation-kafka-streams
+ true
+
+
+ io.zipkin.brave
+ brave-instrumentation-httpclient
+ true
+
+
+ io.zipkin.brave
+ brave-instrumentation-httpasyncclient
+ true
+
+
+ io.zipkin.brave
+ brave-instrumentation-jms
+ true
+
+
+ io.zipkin.brave
+ brave-instrumentation-mongodb
+ true
+
+
+ io.zipkin.aws
+ brave-propagation-aws
+ true
+
+
+ javax.jms
+ javax.jms-api
+ true
+
+
+ io.opentracing.brave
+ brave-opentracing
+ true
+
+
+ org.apache.httpcomponents
+ httpasyncclient
+ true
+
+
+ org.springframework
+ spring-jms
+ true
+
+
+ io.projectreactor.kafka
+ reactor-kafka
+ true
+
+
+
+ io.github.lognet
+ grpc-spring-boot-starter
+ true
+
+
+ org.springframework.boot
+ spring-boot-starter
+
+
+
+
+ io.zipkin.brave
+ brave-instrumentation-grpc
+ true
+
+
+ io.zipkin.reporter2
+ zipkin-reporter-metrics-micrometer
+
+
+ io.micrometer
+ micrometer-core
+
+
+ true
+
+
+
+ io.lettuce
+ lettuce-core
+ true
+
+
+ org.springframework.kafka
+ spring-kafka
+ true
+
+
+ org.apache.kafka
+ kafka-streams
+ true
+
+
+ org.springframework.amqp
+ spring-rabbit
+ true
+
+
+ org.springframework.boot
+ spring-boot-starter-data-mongodb
+ true
+
+
+ org.springframework.boot
+ spring-boot-starter-rsocket
+ true
+
+
+
+
+ org.springframework.cloud
+ spring-cloud-sleuth-zipkin
+ true
+
+
+ io.zipkin.zipkin2
+ zipkin
+ true
+
+
+ io.zipkin.reporter2
+ zipkin-reporter
+ true
+
+
+ io.zipkin.reporter2
+ zipkin-reporter-brave
+ true
+
+
+ io.zipkin.reporter2
+ zipkin-sender-kafka
+ true
+
+
+
+ org.apache.kafka
+ kafka-clients
+
+
+
+
+ io.zipkin.reporter2
+ zipkin-sender-activemq-client
+ true
+
+
+ org.apache.activemq
+ activemq-client
+
+
+
+
+ org.apache.activemq
+ activemq-client
+ true
+
+
+ io.zipkin.reporter2
+ zipkin-sender-amqp-client
+ true
+
+
+
+ com.rabbitmq
+ amqp-client
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-test
+ test
+
+
+ org.awaitility
+ awaitility
+ test
+
+
+ org.mongodb
+ mongodb-driver-reactivestreams
+ test
+
+
+
+
+ io.zipkin.brave
+ brave-instrumentation-http-tests
+ test
+
+
+ com.squareup.okhttp3
+ mockwebserver
+ test
+
+
+
+
+ com.squareup.okhttp3
+ okhttp
+
+ 4.8.0
+ test
+
+
+ com.tngtech.archunit
+ archunit-junit5
+ test
+
+
+ com.h2database
+ h2
+ test
+
+
+
+
+
+
+ fast
+
+ false
+
+
+
+
+ maven-surefire-plugin
+
+ 4
+ true
+ -Xmx1024m -XX:MaxPermSize=256m
+
+
+
+
+
+
+
+
diff --git a/spring-cloud-sleuth-autoconfigure/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/spring-cloud-sleuth-autoconfigure/src/main/resources/META-INF/additional-spring-configuration-metadata.json
index fac014bc6..f361ead6d 100644
--- a/spring-cloud-sleuth-autoconfigure/src/main/resources/META-INF/additional-spring-configuration-metadata.json
+++ b/spring-cloud-sleuth-autoconfigure/src/main/resources/META-INF/additional-spring-configuration-metadata.json
@@ -1,207 +1,207 @@
-{
- "properties": [
- {
- "name": "spring.zipkin.kafka.topic",
- "type": "java.lang.String",
- "description": "Name of the Kafka topic where spans should be sent to Zipkin.",
- "defaultValue": "zipkin"
- },
- {
- "name": "spring.zipkin.rabbitmq.queue",
- "type": "java.lang.String",
- "description": "Name of the RabbitMQ queue where spans should be sent to Zipkin.",
- "defaultValue": "zipkin"
- },
- {
- "name": "spring.zipkin.rabbitmq.addresses",
- "type": "java.lang.String",
- "description": "Addresses of the RabbitMQ brokers used to send spans to Zipkin"
- },
- {
- "name": "spring.zipkin.activemq.queue",
- "type": "java.lang.String",
- "description": "Name of the ActiveMQ queue where spans should be sent to Zipkin.",
- "defaultValue": "zipkin"
- },
- {
- "name": "spring.zipkin.activemq.message-max-bytes",
- "type": "java.lang.String",
- "description": "Maximum number of bytes for a given message with spans sent to Zipkin over ActiveMQ.",
- "defaultValue": 100000
- },
- {
- "name": "spring.sleuth.function.enabled",
- "type": "java.lang.Boolean",
- "description": "Enable instrumenting of Spring Cloud Function and Spring Cloud Function based projects (e.g. Spring Cloud Stream).",
- "defaultValue": true
- },
- {
- "name": "spring.sleuth.integration.websockets.enabled",
- "type": "java.lang.Boolean",
- "description": "Enable tracing for WebSockets.",
- "defaultValue": true
- },
- {
- "name": "spring.sleuth.kafka.enabled",
- "type": "java.lang.Boolean",
- "description": "Enable instrumenting of Apache Kafka clients.",
- "defaultValue": true
- },
- {
- "name": "spring.sleuth.async.enabled",
- "type": "java.lang.Boolean",
- "description": "Enable instrumenting async related components so that the tracing information is passed between threads.",
- "defaultValue": true
- },
- {
- "name": "spring.sleuth.async.configurer.enabled",
- "type": "java.lang.Boolean",
- "description": "Enable default AsyncConfigurer.",
- "defaultValue": true
- },
- {
- "name": "spring.sleuth.feign.enabled",
- "type": "java.lang.Boolean",
- "description": "Enable span information propagation when using Feign.",
- "defaultValue": true
- },
- {
- "name": "spring.sleuth.feign.processor.enabled",
- "type": "java.lang.Boolean",
- "description": "Enable post processor that wraps Feign Context in its tracing representations.",
- "defaultValue": true
- },
- {
- "name": "spring.sleuth.grpc.enabled",
- "type": "java.lang.Boolean",
- "description": "Enable span information propagation when using GRPC.",
- "defaultValue": true
- },
- {
- "name": "spring.sleuth.messaging.jms.enabled",
- "type": "java.lang.Boolean",
- "description": "Enable tracing of JMS.",
- "defaultValue": true
- },
- {
- "name": "spring.sleuth.messaging.rabbit.enabled",
- "type": "java.lang.Boolean",
- "description": "Enable tracing of RabbitMQ.",
- "defaultValue": true
- },
- {
- "name": "spring.sleuth.messaging.kafka.enabled",
- "type": "java.lang.Boolean",
- "description": "Enable tracing of Kafka.",
- "defaultValue": true
- },
- {
- "name": "spring.sleuth.messaging.kafka.mapper.enabled",
- "type": "java.lang.Boolean",
- "description": "Enable DefaultKafkaHeaderMapper tracing for Kafka.",
- "defaultValue": true
- },
- {
- "name": "spring.sleuth.quartz.enabled",
- "type": "java.lang.Boolean",
- "description": "Enable tracing for Quartz.",
- "defaultValue": true
- },
- {
- "name": "spring.sleuth.mongodb.enabled",
- "type": "java.lang.Boolean",
- "description": "Enable tracing for MongoDb.",
- "defaultValue": true
- },
- {
- "name": "spring.sleuth.rpc.enabled",
- "type": "java.lang.Boolean",
- "description": "Enable tracing of RPC.",
- "defaultValue": true
- },
- {
- "name": "spring.sleuth.sampler.refresh.enabled",
- "type": "java.lang.Boolean",
- "description": "Enable refresh scope for sampler.",
- "defaultValue": true
- },
- {
- "name": "spring.sleuth.web.webclient.enabled",
- "type": "java.lang.Boolean",
- "description": "Enable tracing instrumentation for WebClient.",
- "defaultValue": true
- },
- {
- "name": "spring.sleuth.web.tomcat.enabled",
- "type": "java.lang.Boolean",
- "description": "Enable tracing instrumentation for Tomcat.",
- "defaultValue": true
- },
- {
- "name": "spring.sleuth.integration.enabled",
- "type": "java.lang.Boolean",
- "description": "Enable Spring Integration instrumentation.",
- "defaultValue": true
- },
- {
- "name": "spring.sleuth.task.enabled",
- "type": "java.lang.Boolean",
- "description": "Enable Spring Cloud Task instrumentation.",
- "defaultValue": true
- },
- {
- "name": "spring.sleuth.deployer.enabled",
- "type": "java.lang.Boolean",
- "description": "Enable Spring Cloud Deployer instrumentation.",
- "defaultValue": true
- },
- {
- "name": "spring.sleuth.deployer.status-poll-delay",
- "type": "java.lang.Long",
- "description": "Default poll delay to retrieve the deployed application status.",
- "defaultValue": 500
- },
- {
- "name": "spring.sleuth.config.server.enabled",
- "type": "java.lang.Boolean",
- "description": "Enable Spring Cloud Config Server instrumentation.",
- "defaultValue": true
- },
- {
- "name": "spring.sleuth.tx.enabled",
- "type": "java.lang.Boolean",
- "description": "Enable Spring TX instrumentation.",
- "defaultValue": true
- },
- {
- "name": "spring.sleuth.batch.enabled",
- "type": "java.lang.Boolean",
- "description": "Enable Spring Batch instrumentation.",
- "defaultValue": true
- },
- {
- "name": "spring.sleuth.r2dbc.enabled",
- "type": "java.lang.Boolean",
- "description": "Enable R2dbc instrumentation.",
- "defaultValue": true
- },
- {
- "name": "spring.sleuth.session.enabled",
- "type": "java.lang.Boolean",
- "description": "Enable Spring Session instrumentation.",
- "defaultValue": true
- },
- {
- "name": "spring.sleuth.cassandra.enabled",
- "type": "java.lang.Boolean",
- "description": "Enable Cassandra instrumentation.",
- "defaultValue": true
- },
- {
- "name": "spring.sleuth.vault.enabled",
- "type": "java.lang.Boolean",
- "description": "Enable Spring Vault instrumentation.",
- "defaultValue": true
- }
- ]
-}
+{
+ "properties": [
+ {
+ "name": "spring.zipkin.kafka.topic",
+ "type": "java.lang.String",
+ "description": "Name of the Kafka topic where spans should be sent to Zipkin.",
+ "defaultValue": "zipkin"
+ },
+ {
+ "name": "spring.zipkin.rabbitmq.queue",
+ "type": "java.lang.String",
+ "description": "Name of the RabbitMQ queue where spans should be sent to Zipkin.",
+ "defaultValue": "zipkin"
+ },
+ {
+ "name": "spring.zipkin.rabbitmq.addresses",
+ "type": "java.lang.String",
+ "description": "Addresses of the RabbitMQ brokers used to send spans to Zipkin"
+ },
+ {
+ "name": "spring.zipkin.activemq.queue",
+ "type": "java.lang.String",
+ "description": "Name of the ActiveMQ queue where spans should be sent to Zipkin.",
+ "defaultValue": "zipkin"
+ },
+ {
+ "name": "spring.zipkin.activemq.message-max-bytes",
+ "type": "java.lang.String",
+ "description": "Maximum number of bytes for a given message with spans sent to Zipkin over ActiveMQ.",
+ "defaultValue": 100000
+ },
+ {
+ "name": "spring.sleuth.function.enabled",
+ "type": "java.lang.Boolean",
+ "description": "Enable instrumenting of Spring Cloud Function and Spring Cloud Function based projects (e.g. Spring Cloud Stream).",
+ "defaultValue": true
+ },
+ {
+ "name": "spring.sleuth.integration.websockets.enabled",
+ "type": "java.lang.Boolean",
+ "description": "Enable tracing for WebSockets.",
+ "defaultValue": true
+ },
+ {
+ "name": "spring.sleuth.kafka.enabled",
+ "type": "java.lang.Boolean",
+ "description": "Enable instrumenting of Apache Kafka clients.",
+ "defaultValue": true
+ },
+ {
+ "name": "spring.sleuth.async.enabled",
+ "type": "java.lang.Boolean",
+ "description": "Enable instrumenting async related components so that the tracing information is passed between threads.",
+ "defaultValue": true
+ },
+ {
+ "name": "spring.sleuth.async.configurer.enabled",
+ "type": "java.lang.Boolean",
+ "description": "Enable default AsyncConfigurer.",
+ "defaultValue": true
+ },
+ {
+ "name": "spring.sleuth.feign.enabled",
+ "type": "java.lang.Boolean",
+ "description": "Enable span information propagation when using Feign.",
+ "defaultValue": true
+ },
+ {
+ "name": "spring.sleuth.feign.processor.enabled",
+ "type": "java.lang.Boolean",
+ "description": "Enable post processor that wraps Feign Context in its tracing representations.",
+ "defaultValue": true
+ },
+ {
+ "name": "spring.sleuth.grpc.enabled",
+ "type": "java.lang.Boolean",
+ "description": "Enable span information propagation when using GRPC.",
+ "defaultValue": true
+ },
+ {
+ "name": "spring.sleuth.messaging.jms.enabled",
+ "type": "java.lang.Boolean",
+ "description": "Enable tracing of JMS.",
+ "defaultValue": true
+ },
+ {
+ "name": "spring.sleuth.messaging.rabbit.enabled",
+ "type": "java.lang.Boolean",
+ "description": "Enable tracing of RabbitMQ.",
+ "defaultValue": true
+ },
+ {
+ "name": "spring.sleuth.messaging.kafka.enabled",
+ "type": "java.lang.Boolean",
+ "description": "Enable tracing of Kafka.",
+ "defaultValue": true
+ },
+ {
+ "name": "spring.sleuth.messaging.kafka.mapper.enabled",
+ "type": "java.lang.Boolean",
+ "description": "Enable DefaultKafkaHeaderMapper tracing for Kafka.",
+ "defaultValue": true
+ },
+ {
+ "name": "spring.sleuth.quartz.enabled",
+ "type": "java.lang.Boolean",
+ "description": "Enable tracing for Quartz.",
+ "defaultValue": true
+ },
+ {
+ "name": "spring.sleuth.mongodb.enabled",
+ "type": "java.lang.Boolean",
+ "description": "Enable tracing for MongoDb.",
+ "defaultValue": true
+ },
+ {
+ "name": "spring.sleuth.rpc.enabled",
+ "type": "java.lang.Boolean",
+ "description": "Enable tracing of RPC.",
+ "defaultValue": true
+ },
+ {
+ "name": "spring.sleuth.sampler.refresh.enabled",
+ "type": "java.lang.Boolean",
+ "description": "Enable refresh scope for sampler.",
+ "defaultValue": true
+ },
+ {
+ "name": "spring.sleuth.web.webclient.enabled",
+ "type": "java.lang.Boolean",
+ "description": "Enable tracing instrumentation for WebClient.",
+ "defaultValue": true
+ },
+ {
+ "name": "spring.sleuth.web.tomcat.enabled",
+ "type": "java.lang.Boolean",
+ "description": "Enable tracing instrumentation for Tomcat.",
+ "defaultValue": true
+ },
+ {
+ "name": "spring.sleuth.integration.enabled",
+ "type": "java.lang.Boolean",
+ "description": "Enable Spring Integration instrumentation.",
+ "defaultValue": true
+ },
+ {
+ "name": "spring.sleuth.task.enabled",
+ "type": "java.lang.Boolean",
+ "description": "Enable Spring Cloud Task instrumentation.",
+ "defaultValue": true
+ },
+ {
+ "name": "spring.sleuth.deployer.enabled",
+ "type": "java.lang.Boolean",
+ "description": "Enable Spring Cloud Deployer instrumentation.",
+ "defaultValue": true
+ },
+ {
+ "name": "spring.sleuth.deployer.status-poll-delay",
+ "type": "java.lang.Long",
+ "description": "Default poll delay to retrieve the deployed application status.",
+ "defaultValue": 500
+ },
+ {
+ "name": "spring.sleuth.config.server.enabled",
+ "type": "java.lang.Boolean",
+ "description": "Enable Spring Cloud Config Server instrumentation.",
+ "defaultValue": true
+ },
+ {
+ "name": "spring.sleuth.tx.enabled",
+ "type": "java.lang.Boolean",
+ "description": "Enable Spring TX instrumentation.",
+ "defaultValue": true
+ },
+ {
+ "name": "spring.sleuth.batch.enabled",
+ "type": "java.lang.Boolean",
+ "description": "Enable Spring Batch instrumentation.",
+ "defaultValue": true
+ },
+ {
+ "name": "spring.sleuth.r2dbc.enabled",
+ "type": "java.lang.Boolean",
+ "description": "Enable R2dbc instrumentation.",
+ "defaultValue": true
+ },
+ {
+ "name": "spring.sleuth.session.enabled",
+ "type": "java.lang.Boolean",
+ "description": "Enable Spring Session instrumentation.",
+ "defaultValue": true
+ },
+ {
+ "name": "spring.sleuth.cassandra.enabled",
+ "type": "java.lang.Boolean",
+ "description": "Enable Cassandra instrumentation.",
+ "defaultValue": true
+ },
+ {
+ "name": "spring.sleuth.vault.enabled",
+ "type": "java.lang.Boolean",
+ "description": "Enable Spring Vault instrumentation.",
+ "defaultValue": true
+ }
+ ]
+}
diff --git a/spring-cloud-sleuth-autoconfigure/src/main/resources/META-INF/spring.factories b/spring-cloud-sleuth-autoconfigure/src/main/resources/META-INF/spring.factories
index 4c915d613..fdeb8e939 100644
--- a/spring-cloud-sleuth-autoconfigure/src/main/resources/META-INF/spring.factories
+++ b/spring-cloud-sleuth-autoconfigure/src/main/resources/META-INF/spring.factories
@@ -1,46 +1,46 @@
-# Auto Configuration
-org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
-org.springframework.cloud.sleuth.autoconfig.actuate.TraceSleuthActuatorAutoConfiguration,\
-org.springframework.cloud.sleuth.autoconfig.instrument.kafka.TracingKafkaAutoConfiguration,\
-org.springframework.cloud.sleuth.autoconfig.instrument.kafka.TracingReactorKafkaAutoConfiguration,\
-org.springframework.cloud.sleuth.autoconfig.instrument.async.TraceAsyncAutoConfiguration,\
-org.springframework.cloud.sleuth.autoconfig.instrument.async.TraceAsyncCustomAutoConfiguration,\
-org.springframework.cloud.sleuth.autoconfig.instrument.async.TraceAsyncDefaultAutoConfiguration,\
-org.springframework.cloud.sleuth.autoconfig.instrument.batch.TraceBatchAutoConfiguration,\
-org.springframework.cloud.sleuth.autoconfig.instrument.cassandra.TraceCassandraAutoConfiguration,\
-org.springframework.cloud.sleuth.autoconfig.instrument.cassandra.TraceCassandraReactiveAutoConfiguration,\
-org.springframework.cloud.sleuth.autoconfig.instrument.config.TraceSpringCloudConfigAutoConfiguration,\
-org.springframework.cloud.sleuth.autoconfig.instrument.circuitbreaker.TraceCircuitBreakerAutoConfiguration,\
-org.springframework.cloud.sleuth.autoconfig.instrument.deployer.TraceDeployerAutoConfiguration,\
-org.springframework.cloud.sleuth.autoconfig.instrument.jdbc.TraceJdbcAutoConfiguration,\
-org.springframework.cloud.sleuth.autoconfig.instrument.rxjava.TraceRxJavaAutoConfiguration,\
-org.springframework.cloud.sleuth.autoconfig.instrument.quartz.TraceQuartzAutoConfiguration,\
-org.springframework.cloud.sleuth.autoconfig.instrument.task.TraceTaskAutoConfiguration,\
-org.springframework.cloud.sleuth.autoconfig.instrument.web.TraceWebAutoConfiguration,\
-org.springframework.cloud.sleuth.autoconfig.instrument.web.client.TraceWebClientAutoConfiguration,\
-org.springframework.cloud.sleuth.autoconfig.instrument.web.client.feign.TraceFeignClientAutoConfiguration,\
-org.springframework.cloud.sleuth.autoconfig.instrument.web.client.TraceWebAsyncClientAutoConfiguration,\
-org.springframework.cloud.sleuth.autoconfig.instrument.scheduling.TraceSchedulingAutoConfiguration,\
-org.springframework.cloud.sleuth.autoconfig.instrument.session.TraceSessionAutoConfiguration,\
-org.springframework.cloud.sleuth.autoconfig.instrument.reactor.TraceReactorAutoConfiguration,\
-org.springframework.cloud.sleuth.autoconfig.instrument.messaging.TraceFunctionAutoConfiguration,\
-org.springframework.cloud.sleuth.autoconfig.instrument.messaging.TraceSpringIntegrationAutoConfiguration,\
-org.springframework.cloud.sleuth.autoconfig.instrument.messaging.TraceSpringMessagingAutoConfiguration,\
-org.springframework.cloud.sleuth.autoconfig.instrument.messaging.TraceWebSocketAutoConfiguration,\
-org.springframework.cloud.sleuth.autoconfig.instrument.rsocket.TraceRSocketAutoConfiguration, \
-org.springframework.cloud.sleuth.autoconfig.instrument.r2dbc.TraceR2dbcAutoConfiguration, \
-org.springframework.cloud.sleuth.autoconfig.instrument.tx.TraceTxAutoConfiguration, \
-org.springframework.cloud.sleuth.autoconfig.brave.BraveAutoConfiguration,\
-org.springframework.cloud.sleuth.autoconfig.brave.instrument.web.client.BraveWebClientAutoConfiguration,\
-org.springframework.cloud.sleuth.autoconfig.brave.instrument.rpc.BraveRpcAutoConfiguration,\
-org.springframework.cloud.sleuth.autoconfig.brave.instrument.grpc.BraveGrpcAutoConfiguration,\
-org.springframework.cloud.sleuth.autoconfig.brave.instrument.messaging.BraveKafkaStreamsAutoConfiguration,\
-org.springframework.cloud.sleuth.autoconfig.brave.instrument.messaging.BraveMessagingAutoConfiguration,\
-org.springframework.cloud.sleuth.autoconfig.brave.instrument.opentracing.BraveOpentracingAutoConfiguration,\
-org.springframework.cloud.sleuth.autoconfig.brave.instrument.redis.BraveRedisAutoConfiguration,\
-org.springframework.cloud.sleuth.autoconfig.brave.instrument.mongodb.BraveMongoDbAutoConfiguration,\
-org.springframework.cloud.sleuth.autoconfig.zipkin2.ZipkinAutoConfiguration
-# Environment Post Processor
-org.springframework.boot.env.EnvironmentPostProcessor=\
-org.springframework.cloud.sleuth.autoconfig.TraceEnvironmentPostProcessor,\
-org.springframework.cloud.sleuth.autoconfig.instrument.web.client.TraceGatewayEnvironmentPostProcessor
+# Auto Configuration
+org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
+org.springframework.cloud.sleuth.autoconfig.actuate.TraceSleuthActuatorAutoConfiguration,\
+org.springframework.cloud.sleuth.autoconfig.instrument.kafka.TracingKafkaAutoConfiguration,\
+org.springframework.cloud.sleuth.autoconfig.instrument.kafka.TracingReactorKafkaAutoConfiguration,\
+org.springframework.cloud.sleuth.autoconfig.instrument.async.TraceAsyncAutoConfiguration,\
+org.springframework.cloud.sleuth.autoconfig.instrument.async.TraceAsyncCustomAutoConfiguration,\
+org.springframework.cloud.sleuth.autoconfig.instrument.async.TraceAsyncDefaultAutoConfiguration,\
+org.springframework.cloud.sleuth.autoconfig.instrument.batch.TraceBatchAutoConfiguration,\
+org.springframework.cloud.sleuth.autoconfig.instrument.cassandra.TraceCassandraAutoConfiguration,\
+org.springframework.cloud.sleuth.autoconfig.instrument.cassandra.TraceCassandraReactiveAutoConfiguration,\
+org.springframework.cloud.sleuth.autoconfig.instrument.config.TraceSpringCloudConfigAutoConfiguration,\
+org.springframework.cloud.sleuth.autoconfig.instrument.circuitbreaker.TraceCircuitBreakerAutoConfiguration,\
+org.springframework.cloud.sleuth.autoconfig.instrument.deployer.TraceDeployerAutoConfiguration,\
+org.springframework.cloud.sleuth.autoconfig.instrument.jdbc.TraceJdbcAutoConfiguration,\
+org.springframework.cloud.sleuth.autoconfig.instrument.rxjava.TraceRxJavaAutoConfiguration,\
+org.springframework.cloud.sleuth.autoconfig.instrument.quartz.TraceQuartzAutoConfiguration,\
+org.springframework.cloud.sleuth.autoconfig.instrument.task.TraceTaskAutoConfiguration,\
+org.springframework.cloud.sleuth.autoconfig.instrument.web.TraceWebAutoConfiguration,\
+org.springframework.cloud.sleuth.autoconfig.instrument.web.client.TraceWebClientAutoConfiguration,\
+org.springframework.cloud.sleuth.autoconfig.instrument.web.client.feign.TraceFeignClientAutoConfiguration,\
+org.springframework.cloud.sleuth.autoconfig.instrument.web.client.TraceWebAsyncClientAutoConfiguration,\
+org.springframework.cloud.sleuth.autoconfig.instrument.scheduling.TraceSchedulingAutoConfiguration,\
+org.springframework.cloud.sleuth.autoconfig.instrument.session.TraceSessionAutoConfiguration,\
+org.springframework.cloud.sleuth.autoconfig.instrument.reactor.TraceReactorAutoConfiguration,\
+org.springframework.cloud.sleuth.autoconfig.instrument.messaging.TraceFunctionAutoConfiguration,\
+org.springframework.cloud.sleuth.autoconfig.instrument.messaging.TraceSpringIntegrationAutoConfiguration,\
+org.springframework.cloud.sleuth.autoconfig.instrument.messaging.TraceSpringMessagingAutoConfiguration,\
+org.springframework.cloud.sleuth.autoconfig.instrument.messaging.TraceWebSocketAutoConfiguration,\
+org.springframework.cloud.sleuth.autoconfig.instrument.rsocket.TraceRSocketAutoConfiguration, \
+org.springframework.cloud.sleuth.autoconfig.instrument.r2dbc.TraceR2dbcAutoConfiguration, \
+org.springframework.cloud.sleuth.autoconfig.instrument.tx.TraceTxAutoConfiguration, \
+org.springframework.cloud.sleuth.autoconfig.brave.BraveAutoConfiguration,\
+org.springframework.cloud.sleuth.autoconfig.brave.instrument.web.client.BraveWebClientAutoConfiguration,\
+org.springframework.cloud.sleuth.autoconfig.brave.instrument.rpc.BraveRpcAutoConfiguration,\
+org.springframework.cloud.sleuth.autoconfig.brave.instrument.grpc.BraveGrpcAutoConfiguration,\
+org.springframework.cloud.sleuth.autoconfig.brave.instrument.messaging.BraveKafkaStreamsAutoConfiguration,\
+org.springframework.cloud.sleuth.autoconfig.brave.instrument.messaging.BraveMessagingAutoConfiguration,\
+org.springframework.cloud.sleuth.autoconfig.brave.instrument.opentracing.BraveOpentracingAutoConfiguration,\
+org.springframework.cloud.sleuth.autoconfig.brave.instrument.redis.BraveRedisAutoConfiguration,\
+org.springframework.cloud.sleuth.autoconfig.brave.instrument.mongodb.BraveMongoDbAutoConfiguration,\
+org.springframework.cloud.sleuth.autoconfig.zipkin2.ZipkinAutoConfiguration
+# Environment Post Processor
+org.springframework.boot.env.EnvironmentPostProcessor=\
+org.springframework.cloud.sleuth.autoconfig.TraceEnvironmentPostProcessor,\
+org.springframework.cloud.sleuth.autoconfig.instrument.web.client.TraceGatewayEnvironmentPostProcessor
diff --git a/spring-cloud-sleuth-autoconfigure/src/test/resources/application.yml b/spring-cloud-sleuth-autoconfigure/src/test/resources/application.yml
index 151a645e7..1be920d46 100644
--- a/spring-cloud-sleuth-autoconfigure/src/test/resources/application.yml
+++ b/spring-cloud-sleuth-autoconfigure/src/test/resources/application.yml
@@ -1,3 +1,3 @@
-logging.level.org.springframework.cloud: DEBUG
-
-spring.autoconfigure.exclude: org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration, org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration, org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration, org.springframework.boot.autoconfigure.data.web.SpringDataWebAutoConfiguration, org.springframework.cloud.gateway.config.GatewayAutoConfiguration, org.springframework.cloud.gateway.config.GatewayClassPathWarningAutoConfiguration, org.springframework.cloud.gateway.config.GatewayMetricsAutoConfiguration, org.springframework.boot.actuate.autoconfigure.security.servlet.ManagementWebSecurityAutoConfiguration, org.springframework.boot.autoconfigure.r2dbc.R2dbcAutoConfiguration, org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration, org.springframework.boot.autoconfigure.data.mongo.MongoDataAutoConfiguration, org.springframework.cloud.gateway.config.GatewayRedisAutoConfiguration, org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration, org.springframework.boot.autoconfigure.cassandra.CassandraAutoConfiguration
+logging.level.org.springframework.cloud: DEBUG
+
+spring.autoconfigure.exclude: org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration, org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration, org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration, org.springframework.boot.autoconfigure.data.web.SpringDataWebAutoConfiguration, org.springframework.cloud.gateway.config.GatewayAutoConfiguration, org.springframework.cloud.gateway.config.GatewayClassPathWarningAutoConfiguration, org.springframework.cloud.gateway.config.GatewayMetricsAutoConfiguration, org.springframework.boot.actuate.autoconfigure.security.servlet.ManagementWebSecurityAutoConfiguration, org.springframework.boot.autoconfigure.r2dbc.R2dbcAutoConfiguration, org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration, org.springframework.boot.autoconfigure.data.mongo.MongoDataAutoConfiguration, org.springframework.cloud.gateway.config.GatewayRedisAutoConfiguration, org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration, org.springframework.boot.autoconfigure.cassandra.CassandraAutoConfiguration
diff --git a/spring-cloud-sleuth-dependencies/pom.xml b/spring-cloud-sleuth-dependencies/pom.xml
index b8899a8d0..63c510721 100644
--- a/spring-cloud-sleuth-dependencies/pom.xml
+++ b/spring-cloud-sleuth-dependencies/pom.xml
@@ -1,169 +1,169 @@
-
-
-
-
- 4.0.0
-
- spring-cloud-dependencies-parent
- org.springframework.cloud
- 3.1.0-SNAPSHOT
-
-
- spring-cloud-sleuth-dependencies
- 3.1.0-SNAPSHOT
- pom
- spring-cloud-sleuth-dependencies
- Spring Cloud Sleuth Dependencies
-
-
- https://github.com/spring-cloud/spring-cloud-sleuth
- scm:git:git://github.com/spring-cloud/spring-cloud-sleuth.git
-
-
- scm:git:ssh://git@github.com/spring-cloud/spring-cloud-sleuth.git
-
- HEAD
-
-
-
- 5.13.2
- 0.37.4
- 4.2.2
-
-
-
-
- org.springframework.cloud
- spring-cloud-sleuth-autoconfigure
- ${project.version}
-
-
- org.springframework.cloud
- spring-cloud-sleuth-api
- ${project.version}
-
-
- org.springframework.cloud
- spring-cloud-sleuth-instrumentation
- ${project.version}
-
-
- org.springframework.cloud
- spring-cloud-sleuth-brave
- ${project.version}
-
-
- org.springframework.cloud
- spring-cloud-sleuth-zipkin
- ${project.version}
-
-
- org.springframework.cloud
- spring-cloud-starter-sleuth
- ${project.version}
-
-
-
- org.springframework.cloud
- spring-cloud-sleuth-tests-common
- ${project.version}
-
-
-
- io.zipkin.brave
- brave-bom
- ${brave.version}
- pom
- import
-
-
- io.opentracing.brave
- brave-opentracing
- ${brave.opentracing.version}
-
-
- io.zipkin.brave
- *
-
-
-
-
-
- io.github.lognet
- grpc-spring-boot-starter
- ${grpc.spring.boot.version}
-
-
-
-
-
- spring
-
-
- spring-snapshots
- Spring Snapshots
- https://repo.spring.io/snapshot
-
- true
-
-
- false
-
-
-
- spring-milestones
- Spring Milestones
- https://repo.spring.io/milestone
-
- false
-
-
-
- spring-releases
- Spring Releases
- https://repo.spring.io/release
-
- false
-
-
-
-
-
- spring-snapshots
- Spring Snapshots
- https://repo.spring.io/snapshot
-
- true
-
-
- false
-
-
-
- spring-milestones
- Spring Milestones
- https://repo.spring.io/milestone
-
- false
-
-
-
-
-
-
+
+
+
+
+ 4.0.0
+
+ spring-cloud-dependencies-parent
+ org.springframework.cloud
+ 3.1.0-SNAPSHOT
+
+
+ spring-cloud-sleuth-dependencies
+ 3.1.0-SNAPSHOT
+ pom
+ spring-cloud-sleuth-dependencies
+ Spring Cloud Sleuth Dependencies
+
+
+ https://github.com/spring-cloud/spring-cloud-sleuth
+ scm:git:git://github.com/spring-cloud/spring-cloud-sleuth.git
+
+
+ scm:git:ssh://git@github.com/spring-cloud/spring-cloud-sleuth.git
+
+ HEAD
+
+
+
+ 5.13.2
+ 0.37.4
+ 4.2.2
+
+
+
+
+ org.springframework.cloud
+ spring-cloud-sleuth-autoconfigure
+ ${project.version}
+
+
+ org.springframework.cloud
+ spring-cloud-sleuth-api
+ ${project.version}
+
+
+ org.springframework.cloud
+ spring-cloud-sleuth-instrumentation
+ ${project.version}
+
+
+ org.springframework.cloud
+ spring-cloud-sleuth-brave
+ ${project.version}
+
+
+ org.springframework.cloud
+ spring-cloud-sleuth-zipkin
+ ${project.version}
+
+
+ org.springframework.cloud
+ spring-cloud-starter-sleuth
+ ${project.version}
+
+
+
+ org.springframework.cloud
+ spring-cloud-sleuth-tests-common
+ ${project.version}
+
+
+
+ io.zipkin.brave
+ brave-bom
+ ${brave.version}
+ pom
+ import
+
+
+ io.opentracing.brave
+ brave-opentracing
+ ${brave.opentracing.version}
+
+
+ io.zipkin.brave
+ *
+
+
+
+
+
+ io.github.lognet
+ grpc-spring-boot-starter
+ ${grpc.spring.boot.version}
+
+
+
+
+
+ spring
+
+
+ spring-snapshots
+ Spring Snapshots
+ https://repo.spring.io/snapshot
+
+ true
+
+
+ false
+
+
+
+ spring-milestones
+ Spring Milestones
+ https://repo.spring.io/milestone
+
+ false
+
+
+
+ spring-releases
+ Spring Releases
+ https://repo.spring.io/release
+
+ false
+
+
+
+
+
+ spring-snapshots
+ Spring Snapshots
+ https://repo.spring.io/snapshot
+
+ true
+
+
+ false
+
+
+
+ spring-milestones
+ Spring Milestones
+ https://repo.spring.io/milestone
+
+ false
+
+
+
+
+
+
diff --git a/spring-cloud-sleuth-instrumentation/pom.xml b/spring-cloud-sleuth-instrumentation/pom.xml
index 471bae1db..f5d44ce63 100644
--- a/spring-cloud-sleuth-instrumentation/pom.xml
+++ b/spring-cloud-sleuth-instrumentation/pom.xml
@@ -1,362 +1,362 @@
-
-
-
-
- 4.0.0
-
- spring-cloud-sleuth-instrumentation
- jar
- Spring Cloud Sleuth Instrumentation
- Spring Cloud Sleuth Instrumentation
-
-
- org.springframework.cloud
- spring-cloud-sleuth
- 3.1.0-SNAPSHOT
- ..
-
-
-
-
- org.springframework.cloud
- spring-cloud-sleuth-api
-
-
- org.springframework.boot
- spring-boot-starter-web
- true
-
-
- org.springframework.boot
- spring-boot-starter-rsocket
- true
-
-
- io.micrometer
- micrometer-core
- true
-
-
- io.projectreactor
- reactor-core
- true
-
-
- io.rsocket
- rsocket-core
- true
-
-
- io.r2dbc
- r2dbc-proxy
- true
-
-
- io.projectreactor.kafka
- reactor-kafka
- true
-
-
- org.reactivestreams
- reactive-streams
- true
-
-
- org.springframework.boot
- spring-boot-configuration-processor
- true
-
-
- org.springframework.boot
- spring-boot-starter-actuator
- true
-
-
- org.springframework.integration
- spring-integration-core
- true
-
-
- org.springframework.cloud
- spring-cloud-config-server
- true
-
-
- org.springframework.cloud
- spring-cloud-starter-config
- true
-
-
- org.springframework.cloud
- spring-cloud-function-context
- true
-
-
- org.springframework.boot
- spring-boot-starter-websocket
- true
-
-
- org.springframework.boot
- spring-boot-starter-batch
- true
-
-
- org.springframework.cloud
- spring-cloud-stream
-
- ${spring-cloud-stream.version}
- true
-
-
- org.springframework.cloud
- spring-cloud-commons
-
-
- org.springframework
- spring-context
-
-
- org.springframework.cloud
- spring-cloud-context
- true
-
-
- io.reactivex
- rxjava
- true
-
-
- io.github.openfeign
- feign-okhttp
- true
-
-
- org.springframework.cloud
- spring-cloud-starter-openfeign
- true
-
-
- org.springframework.cloud
- spring-cloud-starter-loadbalancer
- true
-
-
- org.springframework.cloud
- spring-cloud-starter-gateway
- true
-
-
- org.springframework.cloud
- spring-cloud-starter-task
- true
-
-
- org.springframework.boot
- spring-boot-starter-data-cassandra
- true
-
-
- org.springframework.boot
- spring-boot-starter-data-cassandra-reactive
- true
-
-
- org.springframework.cloud
- spring-cloud-deployer-spi
- true
-
-
- org.aspectj
- aspectjrt
-
-
-
- org.springframework.boot
- spring-boot-starter-quartz
- true
-
-
- org.springframework.boot
- spring-boot-autoconfigure-processor
- true
-
-
- org.springframework.security.oauth
- spring-security-oauth2
- true
-
-
- org.springframework.security.oauth.boot
- spring-security-oauth2-autoconfigure
- true
-
-
- org.springframework.session
- spring-session-data-redis
- true
-
-
- io.projectreactor.kotlin
- reactor-kotlin-extensions
- true
-
-
- org.jetbrains.kotlin
- kotlin-reflect
- true
-
-
- org.jetbrains.kotlin
- kotlin-stdlib-jdk8
- true
-
-
- org.jetbrains.kotlinx
- kotlinx-coroutines-reactor
- true
-
-
-
- p6spy
- p6spy
- true
-
-
- net.ttddyy
- datasource-proxy
- true
-
-
-
- org.springframework.boot
- spring-boot-starter-test
- test
-
-
- org.awaitility
- awaitility
- test
-
-
- com.tngtech.archunit
- archunit-junit5
- test
-
-
- io.projectreactor
- reactor-test
- test
-
-
-
-
-
-
- org.codehaus.mojo
- build-helper-maven-plugin
- ${build-helper-maven-plugin.version}
-
-
- add-source
- generate-sources
-
- add-source
-
-
-
- src/main/kotlin
-
-
-
-
- add-test-source
- generate-test-sources
-
- add-test-source
-
-
-
- src/test/kotlin
-
-
-
-
-
-
- org.jetbrains.kotlin
- kotlin-maven-plugin
- ${kotlin.version}
-
-
- compile
- compile
-
- compile
-
-
-
- test-compile
- test-compile
-
- test-compile
-
-
-
-
-
- -Xjsr305=strict
-
-
- spring
-
-
-
-
- org.jetbrains.kotlin
- kotlin-maven-allopen
- ${kotlin.version}
-
-
-
-
-
-
-
-
- fast
-
- false
-
-
-
-
- maven-surefire-plugin
-
- 4
- true
- -Xmx1024m -XX:MaxPermSize=256m
-
-
-
-
-
-
-
-
+
+
+
+
+ 4.0.0
+
+ spring-cloud-sleuth-instrumentation
+ jar
+ Spring Cloud Sleuth Instrumentation
+ Spring Cloud Sleuth Instrumentation
+
+
+ org.springframework.cloud
+ spring-cloud-sleuth
+ 3.1.0-SNAPSHOT
+ ..
+
+
+
+
+ org.springframework.cloud
+ spring-cloud-sleuth-api
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+ true
+
+
+ org.springframework.boot
+ spring-boot-starter-rsocket
+ true
+
+
+ io.micrometer
+ micrometer-core
+ true
+
+
+ io.projectreactor
+ reactor-core
+ true
+
+
+ io.rsocket
+ rsocket-core
+ true
+
+
+ io.r2dbc
+ r2dbc-proxy
+ true
+
+
+ io.projectreactor.kafka
+ reactor-kafka
+ true
+
+
+ org.reactivestreams
+ reactive-streams
+ true
+
+
+ org.springframework.boot
+ spring-boot-configuration-processor
+ true
+
+
+ org.springframework.boot
+ spring-boot-starter-actuator
+ true
+
+
+ org.springframework.integration
+ spring-integration-core
+ true
+
+
+ org.springframework.cloud
+ spring-cloud-config-server
+ true
+
+
+ org.springframework.cloud
+ spring-cloud-starter-config
+ true
+
+
+ org.springframework.cloud
+ spring-cloud-function-context
+ true
+
+
+ org.springframework.boot
+ spring-boot-starter-websocket
+ true
+
+
+ org.springframework.boot
+ spring-boot-starter-batch
+ true
+
+
+ org.springframework.cloud
+ spring-cloud-stream
+
+ ${spring-cloud-stream.version}
+ true
+
+
+ org.springframework.cloud
+ spring-cloud-commons
+
+
+ org.springframework
+ spring-context
+
+
+ org.springframework.cloud
+ spring-cloud-context
+ true
+
+
+ io.reactivex
+ rxjava
+ true
+
+
+ io.github.openfeign
+ feign-okhttp
+ true
+
+
+ org.springframework.cloud
+ spring-cloud-starter-openfeign
+ true
+
+
+ org.springframework.cloud
+ spring-cloud-starter-loadbalancer
+ true
+
+
+ org.springframework.cloud
+ spring-cloud-starter-gateway
+ true
+
+
+ org.springframework.cloud
+ spring-cloud-starter-task
+ true
+
+
+ org.springframework.boot
+ spring-boot-starter-data-cassandra
+ true
+
+
+ org.springframework.boot
+ spring-boot-starter-data-cassandra-reactive
+ true
+
+
+ org.springframework.cloud
+ spring-cloud-deployer-spi
+ true
+
+
+ org.aspectj
+ aspectjrt
+
+
+
+ org.springframework.boot
+ spring-boot-starter-quartz
+ true
+
+
+ org.springframework.boot
+ spring-boot-autoconfigure-processor
+ true
+
+
+ org.springframework.security.oauth
+ spring-security-oauth2
+ true
+
+
+ org.springframework.security.oauth.boot
+ spring-security-oauth2-autoconfigure
+ true
+
+
+ org.springframework.session
+ spring-session-data-redis
+ true
+
+
+ io.projectreactor.kotlin
+ reactor-kotlin-extensions
+ true
+
+
+ org.jetbrains.kotlin
+ kotlin-reflect
+ true
+
+
+ org.jetbrains.kotlin
+ kotlin-stdlib-jdk8
+ true
+
+
+ org.jetbrains.kotlinx
+ kotlinx-coroutines-reactor
+ true
+
+
+
+ p6spy
+ p6spy
+ true
+
+
+ net.ttddyy
+ datasource-proxy
+ true
+
+
+
+ org.springframework.boot
+ spring-boot-starter-test
+ test
+
+
+ org.awaitility
+ awaitility
+ test
+
+
+ com.tngtech.archunit
+ archunit-junit5
+ test
+
+
+ io.projectreactor
+ reactor-test
+ test
+
+
+
+
+
+
+ org.codehaus.mojo
+ build-helper-maven-plugin
+ ${build-helper-maven-plugin.version}
+
+
+ add-source
+ generate-sources
+
+ add-source
+
+
+
+ src/main/kotlin
+
+
+
+
+ add-test-source
+ generate-test-sources
+
+ add-test-source
+
+
+
+ src/test/kotlin
+
+
+
+
+
+
+ org.jetbrains.kotlin
+ kotlin-maven-plugin
+ ${kotlin.version}
+
+
+ compile
+ compile
+
+ compile
+
+
+
+ test-compile
+ test-compile
+
+ test-compile
+
+
+
+
+
+ -Xjsr305=strict
+
+
+ spring
+
+
+
+
+ org.jetbrains.kotlin
+ kotlin-maven-allopen
+ ${kotlin.version}
+
+
+
+
+
+
+
+
+ fast
+
+ false
+
+
+
+
+ maven-surefire-plugin
+
+ 4
+ true
+ -Xmx1024m -XX:MaxPermSize=256m
+
+
+
+
+
+
+
+
diff --git a/spring-cloud-sleuth-instrumentation/src/main/java/org/springframework/cloud/sleuth/instrument/batch/TraceJobExecutionListener.java b/spring-cloud-sleuth-instrumentation/src/main/java/org/springframework/cloud/sleuth/instrument/batch/TraceJobExecutionListener.java
index b461403cb..4973de313 100644
--- a/spring-cloud-sleuth-instrumentation/src/main/java/org/springframework/cloud/sleuth/instrument/batch/TraceJobExecutionListener.java
+++ b/spring-cloud-sleuth-instrumentation/src/main/java/org/springframework/cloud/sleuth/instrument/batch/TraceJobExecutionListener.java
@@ -50,24 +50,24 @@ class TraceJobExecutionListener implements JobExecutionListener {
public void afterJob(JobExecution jobExecution) {
SpanAndScope spanAndScope = SPANS.remove(jobExecution);
List throwables = jobExecution.getFailureExceptions();
- // @formatter:off
- AssertingSpan span = SleuthBatchSpan.BATCH_JOB_SPAN.wrap(spanAndScope.getSpan())
- .tag(SleuthBatchSpan.JobTags.JOB_NAME, jobExecution.getJobInstance().getJobName())
- .tag(SleuthBatchSpan.JobTags.JOB_INSTANCE_ID,
- String.valueOf(jobExecution.getJobInstance().getInstanceId()))
- .tag(SleuthBatchSpan.JobTags.JOB_EXECUTION_ID, String.valueOf(jobExecution.getId()));
- // formatter:on
- Tracer.SpanInScope scope = spanAndScope.getScope();
- if (!throwables.isEmpty()) {
- span.error(mergedThrowables(throwables));
- }
- span.end();
- scope.close();
- }
-
- private IllegalStateException mergedThrowables(List throwables) {
- return new IllegalStateException(
- throwables.stream().map(Throwable::toString).collect(Collectors.joining("\n")));
- }
-
+ // @formatter:off
+ AssertingSpan span = SleuthBatchSpan.BATCH_JOB_SPAN.wrap(spanAndScope.getSpan())
+ .tag(SleuthBatchSpan.JobTags.JOB_NAME, jobExecution.getJobInstance().getJobName())
+ .tag(SleuthBatchSpan.JobTags.JOB_INSTANCE_ID,
+ String.valueOf(jobExecution.getJobInstance().getInstanceId()))
+ .tag(SleuthBatchSpan.JobTags.JOB_EXECUTION_ID, String.valueOf(jobExecution.getId()));
+ // formatter:on
+ Tracer.SpanInScope scope = spanAndScope.getScope();
+ if (!throwables.isEmpty()) {
+ span.error(mergedThrowables(throwables));
+ }
+ span.end();
+ scope.close();
+ }
+
+ private IllegalStateException mergedThrowables(List throwables) {
+ return new IllegalStateException(
+ throwables.stream().map(Throwable::toString).collect(Collectors.joining("\n")));
+ }
+
}
diff --git a/spring-cloud-sleuth-instrumentation/src/main/java/org/springframework/cloud/sleuth/instrument/batch/TraceStepExecutionListener.java b/spring-cloud-sleuth-instrumentation/src/main/java/org/springframework/cloud/sleuth/instrument/batch/TraceStepExecutionListener.java
index 9bbdce678..1e21d6986 100644
--- a/spring-cloud-sleuth-instrumentation/src/main/java/org/springframework/cloud/sleuth/instrument/batch/TraceStepExecutionListener.java
+++ b/spring-cloud-sleuth-instrumentation/src/main/java/org/springframework/cloud/sleuth/instrument/batch/TraceStepExecutionListener.java
@@ -51,12 +51,12 @@ class TraceStepExecutionListener implements StepExecutionListener {
public ExitStatus afterStep(StepExecution stepExecution) {
SpanAndScope spanAndScope = SPANS.remove(stepExecution);
List throwables = stepExecution.getFailureExceptions();
- // @formatter:off
- AssertingSpan span = SleuthBatchSpan.BATCH_STEP_SPAN.wrap(spanAndScope.getSpan())
- .tag(SleuthBatchSpan.StepTags.STEP_NAME, stepExecution.getStepName())
- .tag(SleuthBatchSpan.StepTags.JOB_EXECUTION_ID, String.valueOf(stepExecution.getJobExecutionId()))
- .tag(SleuthBatchSpan.StepTags.STEP_EXECUTION_ID, String.valueOf(stepExecution.getId()))
- .tag(SleuthBatchSpan.StepTags.STEP_TYPE, stepExecution.getExecutionContext().getString(Step.STEP_TYPE_KEY));
+ // @formatter:off
+ AssertingSpan span = SleuthBatchSpan.BATCH_STEP_SPAN.wrap(spanAndScope.getSpan())
+ .tag(SleuthBatchSpan.StepTags.STEP_NAME, stepExecution.getStepName())
+ .tag(SleuthBatchSpan.StepTags.JOB_EXECUTION_ID, String.valueOf(stepExecution.getJobExecutionId()))
+ .tag(SleuthBatchSpan.StepTags.STEP_EXECUTION_ID, String.valueOf(stepExecution.getId()))
+ .tag(SleuthBatchSpan.StepTags.STEP_TYPE, stepExecution.getExecutionContext().getString(Step.STEP_TYPE_KEY));
// @formatter:on
Tracer.SpanInScope scope = spanAndScope.getScope();
if (!throwables.isEmpty()) {
diff --git a/spring-cloud-sleuth-instrumentation/src/main/java/org/springframework/cloud/sleuth/instrument/config/TraceEnvironmentRepositoryAspect.java b/spring-cloud-sleuth-instrumentation/src/main/java/org/springframework/cloud/sleuth/instrument/config/TraceEnvironmentRepositoryAspect.java
index f18d88f00..5715df391 100644
--- a/spring-cloud-sleuth-instrumentation/src/main/java/org/springframework/cloud/sleuth/instrument/config/TraceEnvironmentRepositoryAspect.java
+++ b/spring-cloud-sleuth-instrumentation/src/main/java/org/springframework/cloud/sleuth/instrument/config/TraceEnvironmentRepositoryAspect.java
@@ -40,11 +40,11 @@ public class TraceEnvironmentRepositoryAspect {
@Around("execution (* org.springframework.cloud.config.server.environment.EnvironmentRepository.*(..))")
public Object traceFindEnvironment(final ProceedingJoinPoint pjp) throws Throwable {
- // @formatter:off
- AssertingSpan findOneSpan = SleuthConfigSpan.CONFIG_SPAN.wrap(this.tracer.nextSpan())
- .name(SleuthConfigSpan.CONFIG_SPAN.getName())
- .tag(SleuthConfigSpan.Tags.ENVIRONMENT_CLASS, pjp.getTarget().getClass().getName())
- .tag(SleuthConfigSpan.Tags.ENVIRONMENT_METHOD, pjp.getSignature().getName());
+ // @formatter:off
+ AssertingSpan findOneSpan = SleuthConfigSpan.CONFIG_SPAN.wrap(this.tracer.nextSpan())
+ .name(SleuthConfigSpan.CONFIG_SPAN.getName())
+ .tag(SleuthConfigSpan.Tags.ENVIRONMENT_CLASS, pjp.getTarget().getClass().getName())
+ .tag(SleuthConfigSpan.Tags.ENVIRONMENT_METHOD, pjp.getSignature().getName());
// @formatter:on
try (Tracer.SpanInScope ws = this.tracer.withSpan(findOneSpan.start())) {
return pjp.proceed();
diff --git a/spring-cloud-sleuth-instrumentation/src/main/java/org/springframework/cloud/sleuth/instrument/deployer/TraceAppDeployer.java b/spring-cloud-sleuth-instrumentation/src/main/java/org/springframework/cloud/sleuth/instrument/deployer/TraceAppDeployer.java
index f0c60f0d1..adaee3594 100644
--- a/spring-cloud-sleuth-instrumentation/src/main/java/org/springframework/cloud/sleuth/instrument/deployer/TraceAppDeployer.java
+++ b/spring-cloud-sleuth-instrumentation/src/main/java/org/springframework/cloud/sleuth/instrument/deployer/TraceAppDeployer.java
@@ -155,16 +155,16 @@ public class TraceAppDeployer implements AppDeployer {
private void registerListener(Span span, String id) {
PreviousAndCurrentStatus previousAndCurrentStatus = new PreviousAndCurrentStatus(span);
- // @formatter:off
- this.delegate.statusReactive(id)
- .map(previousAndCurrentStatus::updateCurrent)
- .repeatWhen(repeat -> repeat.flatMap(i -> Mono.delay(Duration.ofMillis(pollDelay()))))
- .takeUntil(PreviousAndCurrentStatus::isFinished)
- .last()
- .doOnNext(PreviousAndCurrentStatus::annotateSpan)
- .doOnError(span::error)
- // we will close the span in the reactive part
- .doFinally(signalType -> span.end()).subscribe();
+ // @formatter:off
+ this.delegate.statusReactive(id)
+ .map(previousAndCurrentStatus::updateCurrent)
+ .repeatWhen(repeat -> repeat.flatMap(i -> Mono.delay(Duration.ofMillis(pollDelay()))))
+ .takeUntil(PreviousAndCurrentStatus::isFinished)
+ .last()
+ .doOnNext(PreviousAndCurrentStatus::annotateSpan)
+ .doOnError(span::error)
+ // we will close the span in the reactive part
+ .doFinally(signalType -> span.end()).subscribe();
// @formatter:on
}
diff --git a/spring-cloud-sleuth-instrumentation/src/main/java/org/springframework/cloud/sleuth/instrument/kafka/KafkaTracingUtils.java b/spring-cloud-sleuth-instrumentation/src/main/java/org/springframework/cloud/sleuth/instrument/kafka/KafkaTracingUtils.java
index 55e06ae75..20e7a6858 100644
--- a/spring-cloud-sleuth-instrumentation/src/main/java/org/springframework/cloud/sleuth/instrument/kafka/KafkaTracingUtils.java
+++ b/spring-cloud-sleuth-instrumentation/src/main/java/org/springframework/cloud/sleuth/instrument/kafka/KafkaTracingUtils.java
@@ -33,12 +33,12 @@ final class KafkaTracingUtils {
static void buildAndFinishSpan(ConsumerRecord consumerRecord, Propagator propagator,
Propagator.Getter> extractor) {
- // @formatter:off
- Span.Builder spanBuilder = AssertingSpanBuilder.of(SleuthKafkaSpan.KAFKA_CONSUMER_SPAN, propagator.extract(consumerRecord, extractor).kind(Span.Kind.CONSUMER))
- .name(SleuthKafkaSpan.KAFKA_CONSUMER_SPAN.getName())
- .tag(SleuthKafkaSpan.ConsumerTags.TOPIC, consumerRecord.topic())
- .tag(SleuthKafkaSpan.ConsumerTags.OFFSET, Long.toString(consumerRecord.offset()))
- .tag(SleuthKafkaSpan.ConsumerTags.PARTITION, Integer.toString(consumerRecord.partition()));
+ // @formatter:off
+ Span.Builder spanBuilder = AssertingSpanBuilder.of(SleuthKafkaSpan.KAFKA_CONSUMER_SPAN, propagator.extract(consumerRecord, extractor).kind(Span.Kind.CONSUMER))
+ .name(SleuthKafkaSpan.KAFKA_CONSUMER_SPAN.getName())
+ .tag(SleuthKafkaSpan.ConsumerTags.TOPIC, consumerRecord.topic())
+ .tag(SleuthKafkaSpan.ConsumerTags.OFFSET, Long.toString(consumerRecord.offset()))
+ .tag(SleuthKafkaSpan.ConsumerTags.PARTITION, Integer.toString(consumerRecord.partition()));
// @formatter:on
Span span = spanBuilder.start();
if (log.isDebugEnabled()) {
diff --git a/spring-cloud-sleuth-instrumentation/src/main/java/org/springframework/cloud/sleuth/instrument/r2dbc/TraceProxyExecutionListener.java b/spring-cloud-sleuth-instrumentation/src/main/java/org/springframework/cloud/sleuth/instrument/r2dbc/TraceProxyExecutionListener.java
index 8de1d8ba2..49c045c77 100644
--- a/spring-cloud-sleuth-instrumentation/src/main/java/org/springframework/cloud/sleuth/instrument/r2dbc/TraceProxyExecutionListener.java
+++ b/spring-cloud-sleuth-instrumentation/src/main/java/org/springframework/cloud/sleuth/instrument/r2dbc/TraceProxyExecutionListener.java
@@ -78,12 +78,12 @@ public class TraceProxyExecutionListener implements ProxyExecutionListener {
AssertingSpan clientSpan(QueryExecutionInfo executionInfo, String name) {
R2dbcProperties r2dbcProperties = this.beanFactory.getBean(R2dbcProperties.class);
String url = r2dbcProperties.getUrl();
- // @formatter:off
- AssertingSpanBuilder builder = AssertingSpanBuilder.of(SleuthR2dbcSpan.R2DBC_QUERY_SPAN, tracer.spanBuilder())
- .kind(Span.Kind.CLIENT)
- .name(SleuthR2dbcSpan.R2DBC_QUERY_SPAN.getName()).remoteServiceName(name)
- .tag(SleuthR2dbcSpan.Tags.CONNECTION, name)
- .tag(SleuthR2dbcSpan.Tags.THREAD, executionInfo.getThreadName());
+ // @formatter:off
+ AssertingSpanBuilder builder = AssertingSpanBuilder.of(SleuthR2dbcSpan.R2DBC_QUERY_SPAN, tracer.spanBuilder())
+ .kind(Span.Kind.CLIENT)
+ .name(SleuthR2dbcSpan.R2DBC_QUERY_SPAN.getName()).remoteServiceName(name)
+ .tag(SleuthR2dbcSpan.Tags.CONNECTION, name)
+ .tag(SleuthR2dbcSpan.Tags.THREAD, executionInfo.getThreadName());
// @formatter:on
if (StringUtils.hasText(url)) {
try {
diff --git a/spring-cloud-sleuth-instrumentation/src/main/java/org/springframework/cloud/sleuth/instrument/reactor/ReactorSleuth.java b/spring-cloud-sleuth-instrumentation/src/main/java/org/springframework/cloud/sleuth/instrument/reactor/ReactorSleuth.java
index 3ed8f2faf..3c2063349 100644
--- a/spring-cloud-sleuth-instrumentation/src/main/java/org/springframework/cloud/sleuth/instrument/reactor/ReactorSleuth.java
+++ b/spring-cloud-sleuth-instrumentation/src/main/java/org/springframework/cloud/sleuth/instrument/reactor/ReactorSleuth.java
@@ -365,19 +365,19 @@ public abstract class ReactorSleuth {
return Mono.deferContextual(contextView -> {
Span span = contextView.get(Span.class);
Tracer.SpanInScope scope = contextView.get(Tracer.SpanInScope.class);
- // @formatter:off
- return supplier.get()
- .map(t -> {
- spanCustomizer.accept(t, span);
- return t;
- })
- // TODO: Fix me when this is resolved in Reactor
-// .doOnSubscribe(__ -> scope.close())
- .doOnError(span::error)
- .doFinally(signalType -> {
- span.end();
- scope.close();
- });
+ // @formatter:off
+ return supplier.get()
+ .map(t -> {
+ spanCustomizer.accept(t, span);
+ return t;
+ })
+ // TODO: Fix me when this is resolved in Reactor
+// .doOnSubscribe(__ -> scope.close())
+ .doOnError(span::error)
+ .doFinally(signalType -> {
+ span.end();
+ scope.close();
+ });
// @formatter:on
});
}
@@ -468,19 +468,19 @@ public abstract class ReactorSleuth {
return Flux.deferContextual(contextView -> {
Span span = contextView.get(Span.class);
Tracer.SpanInScope scope = contextView.get(Tracer.SpanInScope.class);
- // @formatter:off
- return supplier.get()
- .map(t -> {
- spanCustomizer.accept(t, span);
- return t;
- })
- // TODO: Fix me when this is resolved in Reactor
-// .doOnSubscribe(__ -> scope.close())
- .doOnError(span::error)
- .doFinally(signalType -> {
- span.end();
- scope.close();
- });
+ // @formatter:off
+ return supplier.get()
+ .map(t -> {
+ spanCustomizer.accept(t, span);
+ return t;
+ })
+ // TODO: Fix me when this is resolved in Reactor
+// .doOnSubscribe(__ -> scope.close())
+ .doOnError(span::error)
+ .doFinally(signalType -> {
+ span.end();
+ scope.close();
+ });
// @formatter:on
});
}
diff --git a/spring-cloud-sleuth-instrumentation/src/main/java/org/springframework/cloud/sleuth/instrument/tx/TracePlatformTransactionManagerTags.java b/spring-cloud-sleuth-instrumentation/src/main/java/org/springframework/cloud/sleuth/instrument/tx/TracePlatformTransactionManagerTags.java
index 2629e1660..5c642d079 100644
--- a/spring-cloud-sleuth-instrumentation/src/main/java/org/springframework/cloud/sleuth/instrument/tx/TracePlatformTransactionManagerTags.java
+++ b/spring-cloud-sleuth-instrumentation/src/main/java/org/springframework/cloud/sleuth/instrument/tx/TracePlatformTransactionManagerTags.java
@@ -29,18 +29,18 @@ final class TracePlatformTransactionManagerTags {
}
static void tag(Span span, TransactionDefinition def, Class transactionManagerClass) {
- // @formatter:off
- AssertingSpan assertingSpan = SleuthTxSpan.TX_SPAN.wrap(span)
- .tag(SleuthTxSpan.Tags.TRANSACTION_MANAGER, ClassUtils.getQualifiedName(transactionManagerClass))
- .tag(SleuthTxSpan.Tags.READ_ONLY, String.valueOf(def.isReadOnly()))
- .tag(SleuthTxSpan.Tags.PROPAGATION_LEVEL, propagationLevel(def))
- .tag(SleuthTxSpan.Tags.ISOLATION_LEVEL, isolationLevel(def));
- if (def.getTimeout() > 0) {
- assertingSpan.tag(SleuthTxSpan.Tags.TIMEOUT, String.valueOf(def.getTimeout()));
- }
- if (StringUtils.hasText(def.getName())) {
- assertingSpan.tag(SleuthTxSpan.Tags.NAME, def.getName());
- }
+ // @formatter:off
+ AssertingSpan assertingSpan = SleuthTxSpan.TX_SPAN.wrap(span)
+ .tag(SleuthTxSpan.Tags.TRANSACTION_MANAGER, ClassUtils.getQualifiedName(transactionManagerClass))
+ .tag(SleuthTxSpan.Tags.READ_ONLY, String.valueOf(def.isReadOnly()))
+ .tag(SleuthTxSpan.Tags.PROPAGATION_LEVEL, propagationLevel(def))
+ .tag(SleuthTxSpan.Tags.ISOLATION_LEVEL, isolationLevel(def));
+ if (def.getTimeout() > 0) {
+ assertingSpan.tag(SleuthTxSpan.Tags.TIMEOUT, String.valueOf(def.getTimeout()));
+ }
+ if (StringUtils.hasText(def.getName())) {
+ assertingSpan.tag(SleuthTxSpan.Tags.NAME, def.getName());
+ }
// @formatter:on
}
diff --git a/spring-cloud-sleuth-instrumentation/src/main/kotlin/org/springframework/cloud/sleuth/instrument/kotlin/asContextElement.kt b/spring-cloud-sleuth-instrumentation/src/main/kotlin/org/springframework/cloud/sleuth/instrument/kotlin/asContextElement.kt
index 9c0641e38..1b77de6de 100644
--- a/spring-cloud-sleuth-instrumentation/src/main/kotlin/org/springframework/cloud/sleuth/instrument/kotlin/asContextElement.kt
+++ b/spring-cloud-sleuth-instrumentation/src/main/kotlin/org/springframework/cloud/sleuth/instrument/kotlin/asContextElement.kt
@@ -1,69 +1,69 @@
-/*
- * Copyright 2013-2021 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.springframework.cloud.sleuth.instrument.kotlin
-
-import kotlinx.coroutines.reactor.ReactorContext
-import org.springframework.cloud.sleuth.CurrentTraceContext
-import org.springframework.cloud.sleuth.Span
-import org.springframework.cloud.sleuth.TraceContext
-import org.springframework.cloud.sleuth.Tracer
-import org.springframework.util.ClassUtils
-import kotlin.coroutines.CoroutineContext
-import kotlin.reflect.jvm.internal.impl.load.kotlin.KotlinClassFinder
-
-/**
- * Returns a [CoroutineContext] which will make this [Context] current when resuming a coroutine
- * and restores the previous [Context] on suspension.
- *
- * Inspired by OpenTelemetry's asContextElement.
- * @since 3.1.0
- */
-fun Tracer.asContextElement(): CoroutineContext {
- return KotlinContextElement(this)
-}
-
-/**
- * Returns the [Span] in this [CoroutineContext] if present, or null otherwise.
- *
- * Inspired by OpenTelemetry's asContextElement.
- * @since 3.1.0
- */
-fun CoroutineContext.currentSpan(): Span? {
- val element = get(KotlinContextElement.KEY)
- if (element is KotlinContextElement) {
- return element.span
- }
- if (!ClassUtils.isPresent("kotlinx.coroutines.reactor.ReactorContext", null)) {
- return null
- }
- val reactorContext = get(ReactorContext.Key)
- if (reactorContext != null) {
- if (reactorContext.context.hasKey(Span::class.java)) {
- return reactorContext.context.get(Span::class.java)
- }
- else if (reactorContext.context.hasKey(TraceContext::class.java) && reactorContext.context.hasKey(Tracer::class.java) && reactorContext.context.hasKey(CurrentTraceContext::class.java)) {
- val traceContext = reactorContext.context.get(TraceContext::class.java)
- reactorContext.context.get(CurrentTraceContext::class.java).maybeScope(traceContext).use {
- return reactorContext.context.get(Tracer::class.java).currentSpan()
- }
- }
- else if (reactorContext.context.hasKey(Tracer::class.java)) {
- return reactorContext.context.get(Tracer::class.java).currentSpan()
- }
- }
- return null
-}
+/*
+ * Copyright 2013-2021 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.springframework.cloud.sleuth.instrument.kotlin
+
+import kotlinx.coroutines.reactor.ReactorContext
+import org.springframework.cloud.sleuth.CurrentTraceContext
+import org.springframework.cloud.sleuth.Span
+import org.springframework.cloud.sleuth.TraceContext
+import org.springframework.cloud.sleuth.Tracer
+import org.springframework.util.ClassUtils
+import kotlin.coroutines.CoroutineContext
+import kotlin.reflect.jvm.internal.impl.load.kotlin.KotlinClassFinder
+
+/**
+ * Returns a [CoroutineContext] which will make this [Context] current when resuming a coroutine
+ * and restores the previous [Context] on suspension.
+ *
+ * Inspired by OpenTelemetry's asContextElement.
+ * @since 3.1.0
+ */
+fun Tracer.asContextElement(): CoroutineContext {
+ return KotlinContextElement(this)
+}
+
+/**
+ * Returns the [Span] in this [CoroutineContext] if present, or null otherwise.
+ *
+ * Inspired by OpenTelemetry's asContextElement.
+ * @since 3.1.0
+ */
+fun CoroutineContext.currentSpan(): Span? {
+ val element = get(KotlinContextElement.KEY)
+ if (element is KotlinContextElement) {
+ return element.span
+ }
+ if (!ClassUtils.isPresent("kotlinx.coroutines.reactor.ReactorContext", null)) {
+ return null
+ }
+ val reactorContext = get(ReactorContext.Key)
+ if (reactorContext != null) {
+ if (reactorContext.context.hasKey(Span::class.java)) {
+ return reactorContext.context.get(Span::class.java)
+ }
+ else if (reactorContext.context.hasKey(TraceContext::class.java) && reactorContext.context.hasKey(Tracer::class.java) && reactorContext.context.hasKey(CurrentTraceContext::class.java)) {
+ val traceContext = reactorContext.context.get(TraceContext::class.java)
+ reactorContext.context.get(CurrentTraceContext::class.java).maybeScope(traceContext).use {
+ return reactorContext.context.get(Tracer::class.java).currentSpan()
+ }
+ }
+ else if (reactorContext.context.hasKey(Tracer::class.java)) {
+ return reactorContext.context.get(Tracer::class.java).currentSpan()
+ }
+ }
+ return null
+}
diff --git a/spring-cloud-sleuth-instrumentation/src/test/kotlin/org/springframework/cloud/sleuth/instrument/kotlin/AsContextElementKtTests.kt b/spring-cloud-sleuth-instrumentation/src/test/kotlin/org/springframework/cloud/sleuth/instrument/kotlin/AsContextElementKtTests.kt
index ca25386c7..200992bd6 100644
--- a/spring-cloud-sleuth-instrumentation/src/test/kotlin/org/springframework/cloud/sleuth/instrument/kotlin/AsContextElementKtTests.kt
+++ b/spring-cloud-sleuth-instrumentation/src/test/kotlin/org/springframework/cloud/sleuth/instrument/kotlin/AsContextElementKtTests.kt
@@ -1,111 +1,111 @@
-/*
- * Copyright 2013-2021 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.springframework.cloud.sleuth.instrument.kotlin
-
-import kotlinx.coroutines.GlobalScope
-import kotlinx.coroutines.async
-import kotlinx.coroutines.launch
-import kotlinx.coroutines.reactor.ReactorContext
-import kotlinx.coroutines.runBlocking
-import org.assertj.core.api.BDDAssertions.then
-import org.junit.jupiter.api.Test
-import org.springframework.boot.test.context.FilteredClassLoader
-import org.springframework.cloud.sleuth.CurrentTraceContext
-import org.springframework.cloud.sleuth.Span
-import org.springframework.cloud.sleuth.TraceContext
-import org.springframework.cloud.sleuth.Tracer
-import org.springframework.cloud.sleuth.tracer.SimpleCurrentTraceContext
-import org.springframework.cloud.sleuth.tracer.SimpleTracer
-import reactor.util.context.Context
-
-internal class AsContextElementKtTests {
-
- @Test
- fun `should return current span from context`(): Unit = runBlocking {
- val simpleTracer = SimpleTracer()
- val nextSpan = simpleTracer.nextSpan().start()
- var spanInGlobalScopeLaunch: Span? = null
- var spanInGlobalScopeAsync: Span? = null
- val asContextElement = simpleTracer.asContextElement()
-
- GlobalScope.launch(asContextElement) {
- spanInGlobalScopeLaunch = coroutineContext.currentSpan()
- }
- GlobalScope.async(asContextElement) {
- spanInGlobalScopeAsync = coroutineContext.currentSpan()
- }.await()
-
- then(spanInGlobalScopeLaunch).isSameAs(nextSpan)
- then(spanInGlobalScopeAsync).isSameAs(nextSpan)
- }
-
- @Test
- fun `should return span from coroutine context when KotlinContextElement present`(): Unit = runBlocking {
- val simpleTracer = SimpleTracer()
- val nextSpan = simpleTracer.nextSpan().start()
- val element = KotlinContextElement(simpleTracer)
-
- then(element.currentSpan()).isSameAs(nextSpan)
- }
-
- @Test
- fun `should return null from coroutine context when KotlinContextElement and Reactor extensions are missing`(): Unit = runBlocking {
- val contextClassLoader = Thread.currentThread().contextClassLoader
- try {
- Thread.currentThread().contextClassLoader = FilteredClassLoader("kotlinx.coroutines.reactor.ReactorContext")
- then(coroutineContext.currentSpan()).isNull()
- } finally {
- Thread.currentThread().contextClassLoader = contextClassLoader
- }
- }
-
- @Test
- fun `should return Span from Reactor extensions when KotlinContextElement missing`(): Unit = runBlocking {
- val simpleTracer = SimpleTracer()
- val nextSpan = simpleTracer.nextSpan().start()
- val reactorContext = ReactorContext(Context.of(Span::class.java, nextSpan))
-
- then(reactorContext.currentSpan()).isSameAs(nextSpan);
- }
-
- @Test
- fun `should return Span from Reactor extensions CurrentTraceContext when KotlinContextElement missing and there is TraceContext in Reactor context`(): Unit = runBlocking {
- val currentTraceContext = SimpleCurrentTraceContext()
- val simpleTracer = SimpleTracer()
- val nextSpan = simpleTracer.nextSpan().start()
- val reactorContext = ReactorContext(Context.of(Tracer::class.java, simpleTracer, CurrentTraceContext::class.java, currentTraceContext, TraceContext::class.java, nextSpan.context()))
-
- then(reactorContext.currentSpan()).isSameAs(nextSpan);
- }
-
- @Test
- fun `should return Span from Reactor extensions Tracer when KotlinContextElement missing and there is no Span in context`(): Unit = runBlocking {
- val simpleTracer = SimpleTracer()
- val nextSpan = simpleTracer.nextSpan().start()
- val reactorContext = ReactorContext(Context.of(Tracer::class.java, simpleTracer))
-
- then(reactorContext.currentSpan()).isSameAs(nextSpan);
- }
-
- @Test
- fun `should return null when no span is found`(): Unit = runBlocking {
- val reactorContext = ReactorContext(Context.empty())
-
- then(reactorContext.currentSpan()).isNull()
- }
-
-}
+/*
+ * Copyright 2013-2021 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.springframework.cloud.sleuth.instrument.kotlin
+
+import kotlinx.coroutines.GlobalScope
+import kotlinx.coroutines.async
+import kotlinx.coroutines.launch
+import kotlinx.coroutines.reactor.ReactorContext
+import kotlinx.coroutines.runBlocking
+import org.assertj.core.api.BDDAssertions.then
+import org.junit.jupiter.api.Test
+import org.springframework.boot.test.context.FilteredClassLoader
+import org.springframework.cloud.sleuth.CurrentTraceContext
+import org.springframework.cloud.sleuth.Span
+import org.springframework.cloud.sleuth.TraceContext
+import org.springframework.cloud.sleuth.Tracer
+import org.springframework.cloud.sleuth.tracer.SimpleCurrentTraceContext
+import org.springframework.cloud.sleuth.tracer.SimpleTracer
+import reactor.util.context.Context
+
+internal class AsContextElementKtTests {
+
+ @Test
+ fun `should return current span from context`(): Unit = runBlocking {
+ val simpleTracer = SimpleTracer()
+ val nextSpan = simpleTracer.nextSpan().start()
+ var spanInGlobalScopeLaunch: Span? = null
+ var spanInGlobalScopeAsync: Span? = null
+ val asContextElement = simpleTracer.asContextElement()
+
+ GlobalScope.launch(asContextElement) {
+ spanInGlobalScopeLaunch = coroutineContext.currentSpan()
+ }
+ GlobalScope.async(asContextElement) {
+ spanInGlobalScopeAsync = coroutineContext.currentSpan()
+ }.await()
+
+ then(spanInGlobalScopeLaunch).isSameAs(nextSpan)
+ then(spanInGlobalScopeAsync).isSameAs(nextSpan)
+ }
+
+ @Test
+ fun `should return span from coroutine context when KotlinContextElement present`(): Unit = runBlocking {
+ val simpleTracer = SimpleTracer()
+ val nextSpan = simpleTracer.nextSpan().start()
+ val element = KotlinContextElement(simpleTracer)
+
+ then(element.currentSpan()).isSameAs(nextSpan)
+ }
+
+ @Test
+ fun `should return null from coroutine context when KotlinContextElement and Reactor extensions are missing`(): Unit = runBlocking {
+ val contextClassLoader = Thread.currentThread().contextClassLoader
+ try {
+ Thread.currentThread().contextClassLoader = FilteredClassLoader("kotlinx.coroutines.reactor.ReactorContext")
+ then(coroutineContext.currentSpan()).isNull()
+ } finally {
+ Thread.currentThread().contextClassLoader = contextClassLoader
+ }
+ }
+
+ @Test
+ fun `should return Span from Reactor extensions when KotlinContextElement missing`(): Unit = runBlocking {
+ val simpleTracer = SimpleTracer()
+ val nextSpan = simpleTracer.nextSpan().start()
+ val reactorContext = ReactorContext(Context.of(Span::class.java, nextSpan))
+
+ then(reactorContext.currentSpan()).isSameAs(nextSpan);
+ }
+
+ @Test
+ fun `should return Span from Reactor extensions CurrentTraceContext when KotlinContextElement missing and there is TraceContext in Reactor context`(): Unit = runBlocking {
+ val currentTraceContext = SimpleCurrentTraceContext()
+ val simpleTracer = SimpleTracer()
+ val nextSpan = simpleTracer.nextSpan().start()
+ val reactorContext = ReactorContext(Context.of(Tracer::class.java, simpleTracer, CurrentTraceContext::class.java, currentTraceContext, TraceContext::class.java, nextSpan.context()))
+
+ then(reactorContext.currentSpan()).isSameAs(nextSpan);
+ }
+
+ @Test
+ fun `should return Span from Reactor extensions Tracer when KotlinContextElement missing and there is no Span in context`(): Unit = runBlocking {
+ val simpleTracer = SimpleTracer()
+ val nextSpan = simpleTracer.nextSpan().start()
+ val reactorContext = ReactorContext(Context.of(Tracer::class.java, simpleTracer))
+
+ then(reactorContext.currentSpan()).isSameAs(nextSpan);
+ }
+
+ @Test
+ fun `should return null when no span is found`(): Unit = runBlocking {
+ val reactorContext = ReactorContext(Context.empty())
+
+ then(reactorContext.currentSpan()).isNull()
+ }
+
+}
diff --git a/tests/brave/pom.xml b/tests/brave/pom.xml
index 50083a144..8171631ef 100644
--- a/tests/brave/pom.xml
+++ b/tests/brave/pom.xml
@@ -1,80 +1,80 @@
-
-
-
-
- 4.0.0
-
- spring-cloud-sleuth-tests-brave
- pom
- Spring Cloud Sleuth Brave Tests
- Spring Cloud Sleuth Brave Tests
-
-
- org.springframework.cloud
- spring-cloud-sleuth-tests
- 3.1.0-SNAPSHOT
- ..
-
-
-
- spring-cloud-sleuth-instrumentation-actuator-tests
- spring-cloud-sleuth-instrumentation-annotation-tests
- spring-cloud-sleuth-instrumentation-async-tests
- spring-cloud-sleuth-instrumentation-baggage-tests
- spring-cloud-sleuth-instrumentation-batch-tests
- spring-cloud-sleuth-instrumentation-config-server-tests
- spring-cloud-sleuth-instrumentation-circuitbreaker-tests
- spring-cloud-sleuth-instrumentation-circuitbreaker-reactive-tests
- spring-cloud-sleuth-instrumentation-feign-tests
- spring-cloud-sleuth-instrumentation-gateway-tests
- spring-cloud-sleuth-instrumentation-grpc-tests
- spring-cloud-sleuth-instrumentation-jdbc-tests
- spring-cloud-sleuth-instrumentation-kafka-tests
- spring-cloud-sleuth-instrumentation-kotlin-tests
- spring-cloud-sleuth-instrumentation-lettuce-tests
- spring-cloud-sleuth-instrumentation-messaging-tests
- spring-cloud-sleuth-instrumentation-mvc-tests
- spring-cloud-sleuth-instrumentation-quartz-tests
- spring-cloud-sleuth-instrumentation-reactor-tests
- spring-cloud-sleuth-instrumentation-rxjava-tests
- spring-cloud-sleuth-instrumentation-r2dbc-tests
- spring-cloud-sleuth-instrumentation-scheduling-tests
- spring-cloud-sleuth-instrumentation-task-tests
- spring-cloud-sleuth-instrumentation-webflux-tests
- spring-cloud-sleuth-instrumentation-rsocket-tests
- spring-cloud-sleuth-zipkin-tests
-
-
-
-
-
-
-
- maven-deploy-plugin
-
- true
-
-
-
-
-
-
-
+
+
+
+
+ 4.0.0
+
+ spring-cloud-sleuth-tests-brave
+ pom
+ Spring Cloud Sleuth Brave Tests
+ Spring Cloud Sleuth Brave Tests
+
+
+ org.springframework.cloud
+ spring-cloud-sleuth-tests
+ 3.1.0-SNAPSHOT
+ ..
+
+
+
+ spring-cloud-sleuth-instrumentation-actuator-tests
+ spring-cloud-sleuth-instrumentation-annotation-tests
+ spring-cloud-sleuth-instrumentation-async-tests
+ spring-cloud-sleuth-instrumentation-baggage-tests
+ spring-cloud-sleuth-instrumentation-batch-tests
+ spring-cloud-sleuth-instrumentation-config-server-tests
+ spring-cloud-sleuth-instrumentation-circuitbreaker-tests
+ spring-cloud-sleuth-instrumentation-circuitbreaker-reactive-tests
+ spring-cloud-sleuth-instrumentation-feign-tests
+ spring-cloud-sleuth-instrumentation-gateway-tests
+ spring-cloud-sleuth-instrumentation-grpc-tests
+ spring-cloud-sleuth-instrumentation-jdbc-tests
+ spring-cloud-sleuth-instrumentation-kafka-tests
+ spring-cloud-sleuth-instrumentation-kotlin-tests
+ spring-cloud-sleuth-instrumentation-lettuce-tests
+ spring-cloud-sleuth-instrumentation-messaging-tests
+ spring-cloud-sleuth-instrumentation-mvc-tests
+ spring-cloud-sleuth-instrumentation-quartz-tests
+ spring-cloud-sleuth-instrumentation-reactor-tests
+ spring-cloud-sleuth-instrumentation-rxjava-tests
+ spring-cloud-sleuth-instrumentation-r2dbc-tests
+ spring-cloud-sleuth-instrumentation-scheduling-tests
+ spring-cloud-sleuth-instrumentation-task-tests
+ spring-cloud-sleuth-instrumentation-webflux-tests
+ spring-cloud-sleuth-instrumentation-rsocket-tests
+ spring-cloud-sleuth-zipkin-tests
+
+
+
+
+
+
+
+ maven-deploy-plugin
+
+ true
+
+
+
+
+
+
+
diff --git a/tests/brave/spring-cloud-sleuth-instrumentation-actuator-tests/pom.xml b/tests/brave/spring-cloud-sleuth-instrumentation-actuator-tests/pom.xml
index bcfbc15e4..d678bf9cb 100644
--- a/tests/brave/spring-cloud-sleuth-instrumentation-actuator-tests/pom.xml
+++ b/tests/brave/spring-cloud-sleuth-instrumentation-actuator-tests/pom.xml
@@ -1,84 +1,84 @@
-
-
-
-
- 4.0.0
-
- spring-cloud-sleuth-instrumentation-actuator-tests
- jar
- Spring Cloud Sleuth Brave Actuator Instrumentation Tests
- Spring Cloud Sleuth Brave Actuator Instrumentation Tests
-
-
- org.springframework.cloud
- spring-cloud-sleuth-tests-brave
- 3.1.0-SNAPSHOT
- ..
-
-
-
- true
-
-
-
-
-
-
- maven-deploy-plugin
-
- true
-
-
-
-
-
-
-
- org.springframework.cloud
- spring-cloud-sleuth-tests-common
-
-
- org.springframework.boot
- spring-boot-starter-web
-
-
- org.springframework.boot
- spring-boot-starter-actuator
-
-
- org.springframework.cloud
- spring-cloud-starter-sleuth
-
-
- org.springframework.boot
- spring-boot-starter-test
-
-
- io.zipkin.brave
- brave-tests
-
-
- org.awaitility
- awaitility
-
-
-
-
+
+
+
+
+ 4.0.0
+
+ spring-cloud-sleuth-instrumentation-actuator-tests
+ jar
+ Spring Cloud Sleuth Brave Actuator Instrumentation Tests
+ Spring Cloud Sleuth Brave Actuator Instrumentation Tests
+
+
+ org.springframework.cloud
+ spring-cloud-sleuth-tests-brave
+ 3.1.0-SNAPSHOT
+ ..
+
+
+
+ true
+
+
+
+
+
+
+ maven-deploy-plugin
+
+ true
+
+
+
+
+
+
+
+ org.springframework.cloud
+ spring-cloud-sleuth-tests-common
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+ org.springframework.boot
+ spring-boot-starter-actuator
+
+
+ org.springframework.cloud
+ spring-cloud-starter-sleuth
+
+
+ org.springframework.boot
+ spring-boot-starter-test
+
+
+ io.zipkin.brave
+ brave-tests
+
+
+ org.awaitility
+ awaitility
+
+
+
+
diff --git a/tests/brave/spring-cloud-sleuth-instrumentation-actuator-tests/src/test/resources/application.yml b/tests/brave/spring-cloud-sleuth-instrumentation-actuator-tests/src/test/resources/application.yml
index be7f4fe29..2b87cbf49 100644
--- a/tests/brave/spring-cloud-sleuth-instrumentation-actuator-tests/src/test/resources/application.yml
+++ b/tests/brave/spring-cloud-sleuth-instrumentation-actuator-tests/src/test/resources/application.yml
@@ -1 +1 @@
-logging.level.org.springframework.cloud: DEBUG
+logging.level.org.springframework.cloud: DEBUG
diff --git a/tests/brave/spring-cloud-sleuth-instrumentation-batch-tests/pom.xml b/tests/brave/spring-cloud-sleuth-instrumentation-batch-tests/pom.xml
index 8b066d3ad..6c8ee8316 100644
--- a/tests/brave/spring-cloud-sleuth-instrumentation-batch-tests/pom.xml
+++ b/tests/brave/spring-cloud-sleuth-instrumentation-batch-tests/pom.xml
@@ -1,90 +1,90 @@
-
-
-
-
- 4.0.0
-
- spring-cloud-sleuth-instrumentation-batch-tests
- jar
- Spring Cloud Sleuth Brave Batch Instrumentation Tests
- Spring Cloud Sleuth Brave Batch Instrumentation Tests
-
-
- org.springframework.cloud
- spring-cloud-sleuth-tests-brave
- 3.1.0-SNAPSHOT
- ..
-
-
-
- true
-
-
-
-
-
-
- maven-deploy-plugin
-
- true
-
-
-
-
-
-
-
- org.springframework.cloud
- spring-cloud-sleuth-tests-common
- ${project.version}
-
-
- org.springframework.boot
- spring-boot-starter-aop
-
-
- org.springframework.boot
- spring-boot-starter-batch
-
-
- com.h2database
- h2
- runtime
-
-
- org.springframework.cloud
- spring-cloud-starter-sleuth
-
-
- org.springframework.boot
- spring-boot-starter-test
-
-
- io.zipkin.brave
- brave-tests
-
-
- org.awaitility
- awaitility
-
-
-
-
+
+
+
+
+ 4.0.0
+
+ spring-cloud-sleuth-instrumentation-batch-tests
+ jar
+ Spring Cloud Sleuth Brave Batch Instrumentation Tests
+ Spring Cloud Sleuth Brave Batch Instrumentation Tests
+
+
+ org.springframework.cloud
+ spring-cloud-sleuth-tests-brave
+ 3.1.0-SNAPSHOT
+ ..
+
+
+
+ true
+
+
+
+
+
+
+ maven-deploy-plugin
+
+ true
+
+
+
+
+
+
+
+ org.springframework.cloud
+ spring-cloud-sleuth-tests-common
+ ${project.version}
+
+
+ org.springframework.boot
+ spring-boot-starter-aop
+
+
+ org.springframework.boot
+ spring-boot-starter-batch
+
+
+ com.h2database
+ h2
+ runtime
+
+
+ org.springframework.cloud
+ spring-cloud-starter-sleuth
+
+
+ org.springframework.boot
+ spring-boot-starter-test
+
+
+ io.zipkin.brave
+ brave-tests
+
+
+ org.awaitility
+ awaitility
+
+
+
+
diff --git a/tests/brave/spring-cloud-sleuth-instrumentation-batch-tests/src/test/resources/application.yml b/tests/brave/spring-cloud-sleuth-instrumentation-batch-tests/src/test/resources/application.yml
index 6d58539e0..7d3456888 100644
--- a/tests/brave/spring-cloud-sleuth-instrumentation-batch-tests/src/test/resources/application.yml
+++ b/tests/brave/spring-cloud-sleuth-instrumentation-batch-tests/src/test/resources/application.yml
@@ -1,5 +1,5 @@
-logging.level.org.springframework.cloud: DEBUG
-logging.level.com.netflix.discovery.InstanceInfoReplicator: ERROR
-logging.level.org.springframework.cloud.sleuth.brave.instrument.web.client.feign: TRACE
-
-spring.autoconfigure.exclude: org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration, org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration, org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration, org.springframework.boot.autoconfigure.data.web.SpringDataWebAutoConfiguration
+logging.level.org.springframework.cloud: DEBUG
+logging.level.com.netflix.discovery.InstanceInfoReplicator: ERROR
+logging.level.org.springframework.cloud.sleuth.brave.instrument.web.client.feign: TRACE
+
+spring.autoconfigure.exclude: org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration, org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration, org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration, org.springframework.boot.autoconfigure.data.web.SpringDataWebAutoConfiguration
diff --git a/tests/brave/spring-cloud-sleuth-instrumentation-jdbc-tests/pom.xml b/tests/brave/spring-cloud-sleuth-instrumentation-jdbc-tests/pom.xml
index af4f29188..259be99a3 100644
--- a/tests/brave/spring-cloud-sleuth-instrumentation-jdbc-tests/pom.xml
+++ b/tests/brave/spring-cloud-sleuth-instrumentation-jdbc-tests/pom.xml
@@ -1,114 +1,114 @@
-
-
-
-
- 4.0.0
-
- spring-cloud-sleuth-instrumentation-jdbc-tests
- jar
- Spring Cloud Sleuth Brave Jdbc Instrumentation Tests
- Spring Cloud Sleuth Brave Jdbc Instrumentation Tests
-
-
- org.springframework.cloud
- spring-cloud-sleuth-tests-brave
- 3.1.0-SNAPSHOT
- ..
-
-
-
- true
-
-
-
-
-
-
- maven-deploy-plugin
-
- true
-
-
-
-
-
-
-
- org.springframework.cloud
- spring-cloud-sleuth-tests-common
-
-
- org.springframework.boot
- spring-boot-starter-aop
-
-
- org.springframework.boot
- spring-boot-starter-data-jpa
-
-
- com.h2database
- h2
- runtime
-
-
- org.apache.commons
- commons-dbcp2
- runtime
-
-
- org.apache.tomcat
- tomcat-jdbc
- runtime
-
-
- com.zaxxer
- HikariCP
- runtime
-
-
- p6spy
- p6spy
- runtime
-
-
- net.ttddyy
- datasource-proxy
- runtime
-
-
- org.springframework.cloud
- spring-cloud-starter-sleuth
-
-
- org.springframework.boot
- spring-boot-starter-test
-
-
- io.zipkin.brave
- brave-tests
-
-
- org.awaitility
- awaitility
-
-
-
-
+
+
+
+
+ 4.0.0
+
+ spring-cloud-sleuth-instrumentation-jdbc-tests
+ jar
+ Spring Cloud Sleuth Brave Jdbc Instrumentation Tests
+ Spring Cloud Sleuth Brave Jdbc Instrumentation Tests
+
+
+ org.springframework.cloud
+ spring-cloud-sleuth-tests-brave
+ 3.1.0-SNAPSHOT
+ ..
+
+
+
+ true
+
+
+
+
+
+
+ maven-deploy-plugin
+
+ true
+
+
+
+
+
+
+
+ org.springframework.cloud
+ spring-cloud-sleuth-tests-common
+
+
+ org.springframework.boot
+ spring-boot-starter-aop
+
+
+ org.springframework.boot
+ spring-boot-starter-data-jpa
+
+
+ com.h2database
+ h2
+ runtime
+
+
+ org.apache.commons
+ commons-dbcp2
+ runtime
+
+
+ org.apache.tomcat
+ tomcat-jdbc
+ runtime
+
+
+ com.zaxxer
+ HikariCP
+ runtime
+
+
+ p6spy
+ p6spy
+ runtime
+
+
+ net.ttddyy
+ datasource-proxy
+ runtime
+
+
+ org.springframework.cloud
+ spring-cloud-starter-sleuth
+
+
+ org.springframework.boot
+ spring-boot-starter-test
+
+
+ io.zipkin.brave
+ brave-tests
+
+
+ org.awaitility
+ awaitility
+
+
+
+
diff --git a/tests/brave/spring-cloud-sleuth-instrumentation-kotlin-tests/pom.xml b/tests/brave/spring-cloud-sleuth-instrumentation-kotlin-tests/pom.xml
index 0dc78f359..61014adcc 100644
--- a/tests/brave/spring-cloud-sleuth-instrumentation-kotlin-tests/pom.xml
+++ b/tests/brave/spring-cloud-sleuth-instrumentation-kotlin-tests/pom.xml
@@ -1,170 +1,170 @@
-
-
-
-
- 4.0.0
-
- spring-cloud-sleuth-instrumentation-kotlin-tests
- jar
- Spring Cloud Sleuth Brave Kotlin Instrumentation Tests
- Spring Cloud Sleuth Brave Kotlin Instrumentation Tests
-
-
- org.springframework.cloud
- spring-cloud-sleuth-tests-brave
- 3.1.0-SNAPSHOT
- ..
-
-
-
- true
-
-
-
-
-
-
- maven-deploy-plugin
-
- true
-
-
-
-
- org.codehaus.mojo
- build-helper-maven-plugin
- ${build-helper-maven-plugin.version}
-
-
- add-source
- generate-sources
-
- add-source
-
-
-
- src/main/kotlin
-
-
-
-
- add-test-source
- generate-test-sources
-
- add-test-source
-
-
-
- src/test/kotlin
-
-
-
-
-
-
- org.jetbrains.kotlin
- kotlin-maven-plugin
- ${kotlin.version}
-
-
- compile
- compile
-
- compile
-
-
-
- test-compile
- test-compile
-
- test-compile
-
-
-
-
-
- -Xjsr305=strict
-
-
- spring
-
-
-
-
- org.jetbrains.kotlin
- kotlin-maven-allopen
- ${kotlin.version}
-
-
-
-
-
-
-
-
- org.springframework.cloud
- spring-cloud-sleuth-tests-common
-
-
- org.springframework.boot
- spring-boot-starter-webflux
-
-
- org.springframework.cloud
- spring-cloud-starter-sleuth
-
-
- org.springframework.boot
- spring-boot-starter-test
-
-
- io.zipkin.brave
- brave-tests
-
-
- org.awaitility
- awaitility
-
-
-
- io.projectreactor.kotlin
- reactor-kotlin-extensions
- true
-
-
- org.jetbrains.kotlin
- kotlin-reflect
- true
-
-
- org.jetbrains.kotlin
- kotlin-stdlib-jdk8
- true
-
-
- org.jetbrains.kotlinx
- kotlinx-coroutines-reactor
- true
-
-
-
-
-
+
+
+
+
+ 4.0.0
+
+ spring-cloud-sleuth-instrumentation-kotlin-tests
+ jar
+ Spring Cloud Sleuth Brave Kotlin Instrumentation Tests
+ Spring Cloud Sleuth Brave Kotlin Instrumentation Tests
+
+
+ org.springframework.cloud
+ spring-cloud-sleuth-tests-brave
+ 3.1.0-SNAPSHOT
+ ..
+
+
+
+ true
+
+
+
+
+
+
+ maven-deploy-plugin
+
+ true
+
+
+
+
+ org.codehaus.mojo
+ build-helper-maven-plugin
+ ${build-helper-maven-plugin.version}
+
+
+ add-source
+ generate-sources
+
+ add-source
+
+
+
+ src/main/kotlin
+
+
+
+
+ add-test-source
+ generate-test-sources
+
+ add-test-source
+
+
+
+ src/test/kotlin
+
+
+
+
+
+
+ org.jetbrains.kotlin
+ kotlin-maven-plugin
+ ${kotlin.version}
+
+
+ compile
+ compile
+
+ compile
+
+
+
+ test-compile
+ test-compile
+
+ test-compile
+
+
+
+
+
+ -Xjsr305=strict
+
+
+ spring
+
+
+
+
+ org.jetbrains.kotlin
+ kotlin-maven-allopen
+ ${kotlin.version}
+
+
+
+
+
+
+
+
+ org.springframework.cloud
+ spring-cloud-sleuth-tests-common
+
+
+ org.springframework.boot
+ spring-boot-starter-webflux
+
+
+ org.springframework.cloud
+ spring-cloud-starter-sleuth
+
+
+ org.springframework.boot
+ spring-boot-starter-test
+
+
+ io.zipkin.brave
+ brave-tests
+
+
+ org.awaitility
+ awaitility
+
+
+
+ io.projectreactor.kotlin
+ reactor-kotlin-extensions
+ true
+
+
+ org.jetbrains.kotlin
+ kotlin-reflect
+ true
+
+
+ org.jetbrains.kotlin
+ kotlin-stdlib-jdk8
+ true
+
+
+ org.jetbrains.kotlinx
+ kotlinx-coroutines-reactor
+ true
+
+
+
+
+
diff --git a/tests/brave/spring-cloud-sleuth-instrumentation-kotlin-tests/src/test/kotlin/org/springframework/cloud/sleuth/kotlin/SleuthCoroutinesApplicationTests.kt b/tests/brave/spring-cloud-sleuth-instrumentation-kotlin-tests/src/test/kotlin/org/springframework/cloud/sleuth/kotlin/SleuthCoroutinesApplicationTests.kt
index 6a33b677a..066d933e4 100644
--- a/tests/brave/spring-cloud-sleuth-instrumentation-kotlin-tests/src/test/kotlin/org/springframework/cloud/sleuth/kotlin/SleuthCoroutinesApplicationTests.kt
+++ b/tests/brave/spring-cloud-sleuth-instrumentation-kotlin-tests/src/test/kotlin/org/springframework/cloud/sleuth/kotlin/SleuthCoroutinesApplicationTests.kt
@@ -1,48 +1,48 @@
-/*
- * Copyright 2013-2021 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.springframework.cloud.sleuth.brave.kotlin
-
-import brave.sampler.Sampler
-import brave.test.TestSpanHandler
-import org.springframework.boot.test.context.SpringBootTest
-import org.springframework.cloud.sleuth.brave.BraveTestSpanHandler
-import org.springframework.context.annotation.Bean
-import org.springframework.context.annotation.Configuration
-import org.springframework.test.context.ContextConfiguration
-
-@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
-@ContextConfiguration
-class SleuthCoroutinesApplicationTests : org.springframework.cloud.sleuth.kotlin.SleuthCoroutinesApplicationTests() {
-
- @Configuration(proxyBeanMethods = false)
- internal class Config {
- @Bean
- fun testSpanHandlerSupplier(testSpanHandler: TestSpanHandler?): org.springframework.cloud.sleuth.test.TestSpanHandler {
- return BraveTestSpanHandler(testSpanHandler)
- }
-
- @Bean
- fun alwaysSampler(): Sampler {
- return Sampler.ALWAYS_SAMPLE
- }
-
- @Bean
- fun braveTestSpanHandler(): TestSpanHandler {
- return TestSpanHandler()
- }
- }
-}
+/*
+ * Copyright 2013-2021 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.springframework.cloud.sleuth.brave.kotlin
+
+import brave.sampler.Sampler
+import brave.test.TestSpanHandler
+import org.springframework.boot.test.context.SpringBootTest
+import org.springframework.cloud.sleuth.brave.BraveTestSpanHandler
+import org.springframework.context.annotation.Bean
+import org.springframework.context.annotation.Configuration
+import org.springframework.test.context.ContextConfiguration
+
+@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
+@ContextConfiguration
+class SleuthCoroutinesApplicationTests : org.springframework.cloud.sleuth.kotlin.SleuthCoroutinesApplicationTests() {
+
+ @Configuration(proxyBeanMethods = false)
+ internal class Config {
+ @Bean
+ fun testSpanHandlerSupplier(testSpanHandler: TestSpanHandler?): org.springframework.cloud.sleuth.test.TestSpanHandler {
+ return BraveTestSpanHandler(testSpanHandler)
+ }
+
+ @Bean
+ fun alwaysSampler(): Sampler {
+ return Sampler.ALWAYS_SAMPLE
+ }
+
+ @Bean
+ fun braveTestSpanHandler(): TestSpanHandler {
+ return TestSpanHandler()
+ }
+ }
+}
diff --git a/tests/brave/spring-cloud-sleuth-instrumentation-r2dbc-tests/pom.xml b/tests/brave/spring-cloud-sleuth-instrumentation-r2dbc-tests/pom.xml
index 2758b3100..f4c32b7f3 100644
--- a/tests/brave/spring-cloud-sleuth-instrumentation-r2dbc-tests/pom.xml
+++ b/tests/brave/spring-cloud-sleuth-instrumentation-r2dbc-tests/pom.xml
@@ -1,94 +1,94 @@
-
-
-
-
- 4.0.0
-
- spring-cloud-sleuth-instrumentation-r2dbc-tests
- jar
- Spring Cloud Sleuth Brave R2DBC Instrumentation Tests
- Spring Cloud Sleuth Brave R2DBC Instrumentation Tests
-
-
- org.springframework.cloud
- spring-cloud-sleuth-tests-brave
- 3.1.0-SNAPSHOT
- ..
-
-
-
- true
-
-
-
-
-
-
- maven-deploy-plugin
-
- true
-
-
-
-
-
-
-
- org.springframework.cloud
- spring-cloud-sleuth-tests-common
-
-
- org.springframework.cloud
- spring-cloud-starter-sleuth
-
-
- org.springframework.boot
- spring-boot-starter-test
-
-
- org.springframework.boot
- spring-boot-starter-data-r2dbc
-
-
- com.h2database
- h2
- runtime
-
-
- io.r2dbc
- r2dbc-h2
- runtime
-
-
- io.r2dbc
- r2dbc-proxy
-
-
- io.zipkin.brave
- brave-tests
-
-
- org.awaitility
- awaitility
-
-
-
-
+
+
+
+
+ 4.0.0
+
+ spring-cloud-sleuth-instrumentation-r2dbc-tests
+ jar
+ Spring Cloud Sleuth Brave R2DBC Instrumentation Tests
+ Spring Cloud Sleuth Brave R2DBC Instrumentation Tests
+
+
+ org.springframework.cloud
+ spring-cloud-sleuth-tests-brave
+ 3.1.0-SNAPSHOT
+ ..
+
+
+
+ true
+
+
+
+
+
+
+ maven-deploy-plugin
+
+ true
+
+
+
+
+
+
+
+ org.springframework.cloud
+ spring-cloud-sleuth-tests-common
+
+
+ org.springframework.cloud
+ spring-cloud-starter-sleuth
+
+
+ org.springframework.boot
+ spring-boot-starter-test
+
+
+ org.springframework.boot
+ spring-boot-starter-data-r2dbc
+
+
+ com.h2database
+ h2
+ runtime
+
+
+ io.r2dbc
+ r2dbc-h2
+ runtime
+
+
+ io.r2dbc
+ r2dbc-proxy
+
+
+ io.zipkin.brave
+ brave-tests
+
+
+ org.awaitility
+ awaitility
+
+
+
+
diff --git a/tests/brave/spring-cloud-sleuth-instrumentation-r2dbc-tests/src/test/resources/application.yml b/tests/brave/spring-cloud-sleuth-instrumentation-r2dbc-tests/src/test/resources/application.yml
index 687a3ab51..9c69ec9c7 100644
--- a/tests/brave/spring-cloud-sleuth-instrumentation-r2dbc-tests/src/test/resources/application.yml
+++ b/tests/brave/spring-cloud-sleuth-instrumentation-r2dbc-tests/src/test/resources/application.yml
@@ -1 +1 @@
-logging.level.org.springframework.cloud: TRACE
+logging.level.org.springframework.cloud: TRACE
diff --git a/tests/brave/spring-cloud-sleuth-instrumentation-rsocket-tests/pom.xml b/tests/brave/spring-cloud-sleuth-instrumentation-rsocket-tests/pom.xml
index 5df34188c..6c4d6bed6 100644
--- a/tests/brave/spring-cloud-sleuth-instrumentation-rsocket-tests/pom.xml
+++ b/tests/brave/spring-cloud-sleuth-instrumentation-rsocket-tests/pom.xml
@@ -1,100 +1,100 @@
-
-
-
-
- 4.0.0
-
- spring-cloud-sleuth-instrumentation-rsocket-tests
- jar
- Spring Cloud Sleuth Brave RSocket Instrumentation Tests
- Spring Cloud Sleuth Brave RSocket Instrumentation Tests
-
-
- org.springframework.cloud
- spring-cloud-sleuth-tests-brave
- 3.1.0-SNAPSHOT
- ..
-
-
-
- true
-
-
-
-
-
-
- maven-deploy-plugin
-
- true
-
-
-
-
-
-
-
- ${project.groupId}
- spring-cloud-sleuth-tests-common
-
-
- org.springframework.boot
- spring-boot-starter-actuator
-
-
- org.springframework.boot
- spring-boot-starter-aop
-
-
- org.springframework.cloud
- spring-cloud-starter-loadbalancer
-
-
- org.springframework.cloud
- spring-cloud-starter-openfeign
-
-
- org.springframework.boot
- spring-boot-starter-rsocket
-
-
- org.springframework.boot
- spring-boot-starter-webflux
-
-
- org.springframework.cloud
- spring-cloud-starter-sleuth
-
-
- org.springframework.boot
- spring-boot-starter-test
-
-
- io.zipkin.brave
- brave-tests
-
-
- org.awaitility
- awaitility
-
-
-
-
+
+
+
+
+ 4.0.0
+
+ spring-cloud-sleuth-instrumentation-rsocket-tests
+ jar
+ Spring Cloud Sleuth Brave RSocket Instrumentation Tests
+ Spring Cloud Sleuth Brave RSocket Instrumentation Tests
+
+
+ org.springframework.cloud
+ spring-cloud-sleuth-tests-brave
+ 3.1.0-SNAPSHOT
+ ..
+
+
+
+ true
+
+
+
+
+
+
+ maven-deploy-plugin
+
+ true
+
+
+
+
+
+
+
+ ${project.groupId}
+ spring-cloud-sleuth-tests-common
+
+
+ org.springframework.boot
+ spring-boot-starter-actuator
+
+
+ org.springframework.boot
+ spring-boot-starter-aop
+
+
+ org.springframework.cloud
+ spring-cloud-starter-loadbalancer
+
+
+ org.springframework.cloud
+ spring-cloud-starter-openfeign
+
+
+ org.springframework.boot
+ spring-boot-starter-rsocket
+
+
+ org.springframework.boot
+ spring-boot-starter-webflux
+
+
+ org.springframework.cloud
+ spring-cloud-starter-sleuth
+
+
+ org.springframework.boot
+ spring-boot-starter-test
+
+
+ io.zipkin.brave
+ brave-tests
+
+
+ org.awaitility
+ awaitility
+
+
+
+
diff --git a/tests/brave/spring-cloud-sleuth-instrumentation-rsocket-tests/src/test/resources/logback.xml b/tests/brave/spring-cloud-sleuth-instrumentation-rsocket-tests/src/test/resources/logback.xml
index c5c54bb21..3869fbf8b 100644
--- a/tests/brave/spring-cloud-sleuth-instrumentation-rsocket-tests/src/test/resources/logback.xml
+++ b/tests/brave/spring-cloud-sleuth-instrumentation-rsocket-tests/src/test/resources/logback.xml
@@ -1,32 +1,32 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/common/pom.xml b/tests/common/pom.xml
index cd6b92e72..d6b158acd 100644
--- a/tests/common/pom.xml
+++ b/tests/common/pom.xml
@@ -1,351 +1,351 @@
-
-
-
-
- 4.0.0
-
- spring-cloud-sleuth-tests-common
- jar
- Spring Cloud Sleuth Tests Common
- Spring Cloud Sleuth Tests Common
-
-
- org.springframework.cloud
- spring-cloud-sleuth-tests
- 3.1.0-SNAPSHOT
- ..
-
-
-
-
- org.springframework.cloud
- spring-cloud-sleuth-instrumentation
-
-
- org.springframework.boot
- spring-boot-starter-test
- compile
-
-
- org.awaitility
- awaitility
- compile
-
-
- com.squareup.okhttp3
- mockwebserver
- true
-
-
- org.springframework.cloud
- spring-cloud-function-context
- true
-
-
- org.springframework.integration
- spring-integration-core
- true
-
-
- org.springframework.boot
- spring-boot-starter-websocket
- true
-
-
- org.springframework.boot
- spring-boot-starter-batch
- true
-
-
- org.springframework.boot
- spring-boot-starter-actuator
- true
-
-
- org.springframework.boot
- spring-boot-starter-web
- true
-
-
- org.springframework.boot
- spring-boot-starter-webflux
- true
-
-
- org.springframework.cloud
- spring-cloud-starter-gateway
- true
-
-
- org.springframework.cloud
- spring-cloud-starter-task
- true
-
-
- org.springframework.cloud
- spring-cloud-starter-circuitbreaker-resilience4j
- true
-
-
- org.springframework.cloud
- spring-cloud-starter-circuitbreaker-reactor-resilience4j
- true
-
-
- org.springframework.boot
- spring-boot-starter-quartz
- true
-
-
- org.springframework.cloud
- spring-cloud-starter-openfeign
- true
-
-
- io.github.openfeign
- feign-okhttp
- true
-
-
- org.springframework.cloud
- spring-cloud-starter-loadbalancer
- true
-
-
- org.springframework.cloud
- spring-cloud-config-server
- true
-
-
- org.apache.httpcomponents
- httpclient
- true
-
-
- org.springframework.cloud
- spring-cloud-sleuth-autoconfigure
- true
-
-
- org.springframework.cloud
- spring-cloud-sleuth-brave
- true
-
-
- io.zipkin.brave
- brave-tests
- true
-
-
- io.projectreactor
- reactor-test
- true
-
-
- io.projectreactor.kafka
- reactor-kafka
- true
-
-
- org.springframework.boot
- spring-boot-starter-data-r2dbc
- true
-
-
- io.r2dbc
- r2dbc-proxy
- true
-
-
- org.testcontainers
- testcontainers
- true
-
-
- org.testcontainers
- junit-jupiter
- true
-
-
- org.testcontainers
- kafka
- true
-
-
- org.springframework.boot
- spring-boot-starter-rsocket
- true
-
-
- p6spy
- p6spy
- true
-
-
- net.ttddyy
- datasource-proxy
- true
-
-
- org.springframework.cloud
- spring-cloud-sleuth-zipkin
- true
-
-
- io.zipkin.zipkin2
- zipkin
- true
-
-
- io.zipkin.reporter2
- zipkin-reporter
- true
-
-
- io.zipkin.reporter2
- zipkin-reporter-brave
- true
-
-
- io.zipkin.reporter2
- zipkin-sender-kafka
- true
-
-
-
- org.apache.kafka
- kafka-clients
-
-
-
-
- io.zipkin.reporter2
- zipkin-sender-activemq-client
- true
-
-
- org.apache.activemq
- activemq-client
-
-
-
-
- org.apache.activemq
- activemq-client
- true
-
-
- io.zipkin.reporter2
- zipkin-sender-amqp-client
- true
-
-
-
- com.rabbitmq
- amqp-client
-
-
-
-
-
- io.projectreactor.kotlin
- reactor-kotlin-extensions
- true
-
-
- org.jetbrains.kotlin
- kotlin-reflect
- true
-
-
- org.jetbrains.kotlin
- kotlin-stdlib-jdk8
- true
-
-
- org.jetbrains.kotlinx
- kotlinx-coroutines-reactor
- true
-
-
-
-
-
-
-
- org.codehaus.mojo
- build-helper-maven-plugin
- ${build-helper-maven-plugin.version}
-
-
- add-source
- generate-sources
-
- add-source
-
-
-
- src/main/kotlin
-
-
-
-
-
-
- org.jetbrains.kotlin
- kotlin-maven-plugin
- ${kotlin.version}
-
-
- compile
- compile
-
- compile
-
-
-
- test-compile
- test-compile
-
- test-compile
-
-
-
-
-
- -Xjsr305=strict
-
-
- spring
-
-
-
-
- org.jetbrains.kotlin
- kotlin-maven-allopen
- ${kotlin.version}
-
-
-
-
-
-
-
+
+
+
+
+ 4.0.0
+
+ spring-cloud-sleuth-tests-common
+ jar
+ Spring Cloud Sleuth Tests Common
+ Spring Cloud Sleuth Tests Common
+
+
+ org.springframework.cloud
+ spring-cloud-sleuth-tests
+ 3.1.0-SNAPSHOT
+ ..
+
+
+
+
+ org.springframework.cloud
+ spring-cloud-sleuth-instrumentation
+
+
+ org.springframework.boot
+ spring-boot-starter-test
+ compile
+
+
+ org.awaitility
+ awaitility
+ compile
+
+
+ com.squareup.okhttp3
+ mockwebserver
+ true
+
+
+ org.springframework.cloud
+ spring-cloud-function-context
+ true
+
+
+ org.springframework.integration
+ spring-integration-core
+ true
+
+
+ org.springframework.boot
+ spring-boot-starter-websocket
+ true
+
+
+ org.springframework.boot
+ spring-boot-starter-batch
+ true
+
+
+ org.springframework.boot
+ spring-boot-starter-actuator
+ true
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+ true
+
+
+ org.springframework.boot
+ spring-boot-starter-webflux
+ true
+
+
+ org.springframework.cloud
+ spring-cloud-starter-gateway
+ true
+
+
+ org.springframework.cloud
+ spring-cloud-starter-task
+ true
+
+
+ org.springframework.cloud
+ spring-cloud-starter-circuitbreaker-resilience4j
+ true
+
+
+ org.springframework.cloud
+ spring-cloud-starter-circuitbreaker-reactor-resilience4j
+ true
+
+
+ org.springframework.boot
+ spring-boot-starter-quartz
+ true
+
+
+ org.springframework.cloud
+ spring-cloud-starter-openfeign
+ true
+
+
+ io.github.openfeign
+ feign-okhttp
+ true
+
+
+ org.springframework.cloud
+ spring-cloud-starter-loadbalancer
+ true
+
+
+ org.springframework.cloud
+ spring-cloud-config-server
+ true
+
+
+ org.apache.httpcomponents
+ httpclient
+ true
+
+
+ org.springframework.cloud
+ spring-cloud-sleuth-autoconfigure
+ true
+
+
+ org.springframework.cloud
+ spring-cloud-sleuth-brave
+ true
+
+
+ io.zipkin.brave
+ brave-tests
+ true
+
+
+ io.projectreactor
+ reactor-test
+ true
+
+
+ io.projectreactor.kafka
+ reactor-kafka
+ true
+
+
+ org.springframework.boot
+ spring-boot-starter-data-r2dbc
+ true
+
+
+ io.r2dbc
+ r2dbc-proxy
+ true
+
+
+ org.testcontainers
+ testcontainers
+ true
+
+
+ org.testcontainers
+ junit-jupiter
+ true
+
+
+ org.testcontainers
+ kafka
+ true
+
+
+ org.springframework.boot
+ spring-boot-starter-rsocket
+ true
+
+
+ p6spy
+ p6spy
+ true
+
+
+ net.ttddyy
+ datasource-proxy
+ true
+
+
+ org.springframework.cloud
+ spring-cloud-sleuth-zipkin
+ true
+
+
+ io.zipkin.zipkin2
+ zipkin
+ true
+
+
+ io.zipkin.reporter2
+ zipkin-reporter
+ true
+
+
+ io.zipkin.reporter2
+ zipkin-reporter-brave
+ true
+
+
+ io.zipkin.reporter2
+ zipkin-sender-kafka
+ true
+
+
+
+ org.apache.kafka
+ kafka-clients
+
+
+
+
+ io.zipkin.reporter2
+ zipkin-sender-activemq-client
+ true
+
+
+ org.apache.activemq
+ activemq-client
+
+
+
+
+ org.apache.activemq
+ activemq-client
+ true
+
+
+ io.zipkin.reporter2
+ zipkin-sender-amqp-client
+ true
+
+
+
+ com.rabbitmq
+ amqp-client
+
+
+
+
+
+ io.projectreactor.kotlin
+ reactor-kotlin-extensions
+ true
+
+
+ org.jetbrains.kotlin
+ kotlin-reflect
+ true
+
+
+ org.jetbrains.kotlin
+ kotlin-stdlib-jdk8
+ true
+
+
+ org.jetbrains.kotlinx
+ kotlinx-coroutines-reactor
+ true
+
+
+
+
+
+
+
+ org.codehaus.mojo
+ build-helper-maven-plugin
+ ${build-helper-maven-plugin.version}
+
+
+ add-source
+ generate-sources
+
+ add-source
+
+
+
+ src/main/kotlin
+
+
+
+
+
+
+ org.jetbrains.kotlin
+ kotlin-maven-plugin
+ ${kotlin.version}
+
+
+ compile
+ compile
+
+ compile
+
+
+
+ test-compile
+ test-compile
+
+ test-compile
+
+
+
+
+
+ -Xjsr305=strict
+
+
+ spring
+
+
+
+
+ org.jetbrains.kotlin
+ kotlin-maven-allopen
+ ${kotlin.version}
+
+
+
+
+
+
+
diff --git a/tests/common/src/main/kotlin/org/springframework/cloud/sleuth/kotlin/SleuthCoroutinesApplicationTests.kt b/tests/common/src/main/kotlin/org/springframework/cloud/sleuth/kotlin/SleuthCoroutinesApplicationTests.kt
index 213148959..01e7bb669 100644
--- a/tests/common/src/main/kotlin/org/springframework/cloud/sleuth/kotlin/SleuthCoroutinesApplicationTests.kt
+++ b/tests/common/src/main/kotlin/org/springframework/cloud/sleuth/kotlin/SleuthCoroutinesApplicationTests.kt
@@ -1,110 +1,110 @@
-/*
- * Copyright 2013-2021 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.springframework.cloud.sleuth.kotlin
-
-import kotlinx.coroutines.GlobalScope
-import kotlinx.coroutines.async
-import kotlinx.coroutines.launch
-import kotlinx.coroutines.runBlocking
-import org.assertj.core.api.BDDAssertions.then
-import org.junit.jupiter.api.Test
-import org.slf4j.Logger
-import org.slf4j.LoggerFactory
-import org.springframework.beans.factory.annotation.Autowired
-import org.springframework.boot.autoconfigure.EnableAutoConfiguration
-import org.springframework.boot.test.context.TestConfiguration
-import org.springframework.boot.web.server.LocalServerPort
-import org.springframework.cloud.sleuth.Span
-import org.springframework.cloud.sleuth.Tracer
-import org.springframework.cloud.sleuth.instrument.kotlin.asContextElement
-import org.springframework.cloud.sleuth.instrument.kotlin.currentSpan
-import org.springframework.context.annotation.Bean
-import org.springframework.test.context.ContextConfiguration
-import org.springframework.web.bind.annotation.GetMapping
-import org.springframework.web.bind.annotation.RestController
-import org.springframework.web.client.RestTemplate
-import kotlin.coroutines.coroutineContext
-
-@ContextConfiguration(classes = [SleuthCoroutinesApplicationTests.ControllerTestConfig::class])
-abstract class SleuthCoroutinesApplicationTests {
-
- @LocalServerPort
- var serverPort: Int = 0
-
- @Autowired
- lateinit var tracer: Tracer
-
- @Autowired
- lateinit var webController: WebController
-
- @Autowired
- lateinit var restTemplate: RestTemplate
-
- @Test
- fun should_pass_tracing_context_within_coroutines(): Unit = runBlocking {
- val nextSpan = tracer.nextSpan()
- val traceId = nextSpan.context().traceId()
- tracer.withSpan(nextSpan.start()).use { withSpan ->
- val response = restTemplate.getForObject(applicationUrl(), String::class.java)
- // span in the controller is set
- then(webController.spanInController).isNotNull
- then(webController.spanInController?.context()?.traceId()).isEqualTo(traceId)
- // span in global scope launch is set
- then(webController.spanInGlobalScopeLaunch).isNotNull
- then(webController.spanInGlobalScopeLaunch?.context()?.traceId()).isEqualTo(traceId)
- // span in global async scope is set
- then(webController.spanInGlobalScopeAsync).isNotNull
- then(webController.spanInGlobalScopeAsync?.context()?.traceId()).isEqualTo(traceId)
- // trace id got propagated
- then(response).isEqualTo(traceId)
- }
- }
-
- private fun applicationUrl() = "http://localhost:$serverPort/hello"
-
- @TestConfiguration
- @EnableAutoConfiguration
- internal class ControllerTestConfig {
- @Bean
- fun restTemplate(): RestTemplate = RestTemplate()
-
- @Bean
- fun webController(tracer: Tracer): WebController = WebController(tracer)
- }
-}
-
-@RestController
-class WebController(val tracer: Tracer) {
- val log: Logger = LoggerFactory.getLogger(this::class.java)
- var spanInController: Span? = null
- var spanInGlobalScopeLaunch: Span? = null
- var spanInGlobalScopeAsync: Span? = null
-
- @GetMapping("/hello")
- suspend fun hello(): String? {
- spanInController = coroutineContext.currentSpan()
- GlobalScope.launch(tracer.asContextElement()) {
- log.info("in Coroutines context (launch) - current span {}", coroutineContext.currentSpan())
- spanInGlobalScopeLaunch = coroutineContext.currentSpan()
- }
- GlobalScope.async(tracer.asContextElement()) {
- log.info("in Coroutines context (async)- current span {}", coroutineContext.currentSpan())
- spanInGlobalScopeAsync = coroutineContext.currentSpan()
- }.await()
- return coroutineContext.currentSpan()?.context()?.traceId()
- }
-}
+/*
+ * Copyright 2013-2021 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.springframework.cloud.sleuth.kotlin
+
+import kotlinx.coroutines.GlobalScope
+import kotlinx.coroutines.async
+import kotlinx.coroutines.launch
+import kotlinx.coroutines.runBlocking
+import org.assertj.core.api.BDDAssertions.then
+import org.junit.jupiter.api.Test
+import org.slf4j.Logger
+import org.slf4j.LoggerFactory
+import org.springframework.beans.factory.annotation.Autowired
+import org.springframework.boot.autoconfigure.EnableAutoConfiguration
+import org.springframework.boot.test.context.TestConfiguration
+import org.springframework.boot.web.server.LocalServerPort
+import org.springframework.cloud.sleuth.Span
+import org.springframework.cloud.sleuth.Tracer
+import org.springframework.cloud.sleuth.instrument.kotlin.asContextElement
+import org.springframework.cloud.sleuth.instrument.kotlin.currentSpan
+import org.springframework.context.annotation.Bean
+import org.springframework.test.context.ContextConfiguration
+import org.springframework.web.bind.annotation.GetMapping
+import org.springframework.web.bind.annotation.RestController
+import org.springframework.web.client.RestTemplate
+import kotlin.coroutines.coroutineContext
+
+@ContextConfiguration(classes = [SleuthCoroutinesApplicationTests.ControllerTestConfig::class])
+abstract class SleuthCoroutinesApplicationTests {
+
+ @LocalServerPort
+ var serverPort: Int = 0
+
+ @Autowired
+ lateinit var tracer: Tracer
+
+ @Autowired
+ lateinit var webController: WebController
+
+ @Autowired
+ lateinit var restTemplate: RestTemplate
+
+ @Test
+ fun should_pass_tracing_context_within_coroutines(): Unit = runBlocking {
+ val nextSpan = tracer.nextSpan()
+ val traceId = nextSpan.context().traceId()
+ tracer.withSpan(nextSpan.start()).use { withSpan ->
+ val response = restTemplate.getForObject(applicationUrl(), String::class.java)
+ // span in the controller is set
+ then(webController.spanInController).isNotNull
+ then(webController.spanInController?.context()?.traceId()).isEqualTo(traceId)
+ // span in global scope launch is set
+ then(webController.spanInGlobalScopeLaunch).isNotNull
+ then(webController.spanInGlobalScopeLaunch?.context()?.traceId()).isEqualTo(traceId)
+ // span in global async scope is set
+ then(webController.spanInGlobalScopeAsync).isNotNull
+ then(webController.spanInGlobalScopeAsync?.context()?.traceId()).isEqualTo(traceId)
+ // trace id got propagated
+ then(response).isEqualTo(traceId)
+ }
+ }
+
+ private fun applicationUrl() = "http://localhost:$serverPort/hello"
+
+ @TestConfiguration
+ @EnableAutoConfiguration
+ internal class ControllerTestConfig {
+ @Bean
+ fun restTemplate(): RestTemplate = RestTemplate()
+
+ @Bean
+ fun webController(tracer: Tracer): WebController = WebController(tracer)
+ }
+}
+
+@RestController
+class WebController(val tracer: Tracer) {
+ val log: Logger = LoggerFactory.getLogger(this::class.java)
+ var spanInController: Span? = null
+ var spanInGlobalScopeLaunch: Span? = null
+ var spanInGlobalScopeAsync: Span? = null
+
+ @GetMapping("/hello")
+ suspend fun hello(): String? {
+ spanInController = coroutineContext.currentSpan()
+ GlobalScope.launch(tracer.asContextElement()) {
+ log.info("in Coroutines context (launch) - current span {}", coroutineContext.currentSpan())
+ spanInGlobalScopeLaunch = coroutineContext.currentSpan()
+ }
+ GlobalScope.async(tracer.asContextElement()) {
+ log.info("in Coroutines context (async)- current span {}", coroutineContext.currentSpan())
+ spanInGlobalScopeAsync = coroutineContext.currentSpan()
+ }.await()
+ return coroutineContext.currentSpan()?.context()?.traceId()
+ }
+}
diff --git a/tests/common/src/main/resources/schema.sql b/tests/common/src/main/resources/schema.sql
index 2680487e8..89a0f4b8d 100644
--- a/tests/common/src/main/resources/schema.sql
+++ b/tests/common/src/main/resources/schema.sql
@@ -1 +1 @@
-CREATE TABLE reactive_customer (id SERIAL PRIMARY KEY, first_name VARCHAR(255), last_name VARCHAR(255));
+CREATE TABLE reactive_customer (id SERIAL PRIMARY KEY, first_name VARCHAR(255), last_name VARCHAR(255));