From 151218b30aa62d18a0753b09a89e0e7dc735e34e Mon Sep 17 00:00:00 2001 From: buildmaster Date: Wed, 4 Mar 2020 16:57:41 +0000 Subject: [PATCH 1/4] Update SNAPSHOT to 2.2.2.RELEASE --- README.adoc | 3 + benchmarks/pom.xml | 4 +- docs/pom.xml | 2 +- docs/src/main/asciidoc/_configprops.adoc | 4 +- pom.xml | 20 +- spring-cloud-sleuth-core/pom.xml | 2 +- .../.flattened-pom.xml | 203 ++++++++++++++++++ spring-cloud-sleuth-dependencies/pom.xml | 4 +- spring-cloud-sleuth-samples/pom.xml | 2 +- .../spring-cloud-sleuth-sample-feign/pom.xml | 2 +- .../pom.xml | 2 +- .../spring-cloud-sleuth-sample-ribbon/pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../spring-cloud-sleuth-sample-zipkin/pom.xml | 2 +- .../spring-cloud-sleuth-sample/pom.xml | 2 +- spring-cloud-sleuth-zipkin/pom.xml | 2 +- spring-cloud-starter-sleuth/pom.xml | 2 +- spring-cloud-starter-zipkin/pom.xml | 2 +- tests/pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- 33 files changed, 249 insertions(+), 43 deletions(-) create mode 100644 spring-cloud-sleuth-dependencies/.flattened-pom.xml diff --git a/README.adoc b/README.adoc index 71493d83d..78e9c7dfe 100644 --- a/README.adoc +++ b/README.adoc @@ -307,6 +307,7 @@ Consider the following example of a Logback configuration file (named https://gi "span": "%X{X-B3-SpanId:-}", "parent": "%X{X-B3-ParentSpanId:-}", "exportable": "%X{X-Span-Export:-}", + "baggage": "%X{key:-}", "pid": "${PID:-}", "thread": "%thread", "class": "%logger{40}", @@ -888,6 +889,7 @@ Checkstyle rules are *disabled by default*. To add checkstyle to your project ju spring-javaformat-maven-plugin <5> + org.apache.maven.plugins maven-checkstyle-plugin @@ -895,6 +897,7 @@ Checkstyle rules are *disabled by default*. To add checkstyle to your project ju <5> + org.apache.maven.plugins maven-checkstyle-plugin diff --git a/benchmarks/pom.xml b/benchmarks/pom.xml index 3d95f0dcc..98ab380b7 100644 --- a/benchmarks/pom.xml +++ b/benchmarks/pom.xml @@ -22,7 +22,7 @@ Benchmarks Benchmarks (JMH) org.springframework.cloud - 2.2.2.BUILD-SNAPSHOT + 2.2.2.RELEASE benchmarks @@ -32,7 +32,7 @@ true 1.8 1.8 - 2.3.0.BUILD-SNAPSHOT + 2.2.5.RELEASE 5.10.1 3.14.6 diff --git a/docs/pom.xml b/docs/pom.xml index 45c220e0d..157d9da60 100644 --- a/docs/pom.xml +++ b/docs/pom.xml @@ -22,7 +22,7 @@ org.springframework.cloud spring-cloud-sleuth - 2.2.2.BUILD-SNAPSHOT + 2.2.2.RELEASE spring-cloud-sleuth-docs pom diff --git a/docs/src/main/asciidoc/_configprops.adoc b/docs/src/main/asciidoc/_configprops.adoc index 2692e0e3c..4b7ff8d51 100644 --- a/docs/src/main/asciidoc/_configprops.adoc +++ b/docs/src/main/asciidoc/_configprops.adoc @@ -12,11 +12,11 @@ |spring.sleuth.feign.processor.enabled | true | Enable post processor that wraps Feign Context in its tracing representations. |spring.sleuth.grpc.enabled | true | Enable span information propagation when using GRPC. |spring.sleuth.http.enabled | true | -|spring.sleuth.http.legacy.enabled | false | Enables the legacy Sleuth setup. +|spring.sleuth.http.legacy.enabled | false | |spring.sleuth.hystrix.strategy.enabled | true | Enable custom HystrixConcurrencyStrategy that wraps all Callable instances into their Sleuth representative - the TraceCallable. |spring.sleuth.hystrix.strategy.passthrough | false | When enabled the tracing information is passed to the Hystrix execution threads but spans are not created for each execution. |spring.sleuth.integration.enabled | true | Enable Spring Integration sleuth instrumentation. -|spring.sleuth.integration.patterns | [!hystrixStreamOutput*, *] | An array of patterns against which channel names will be matched. @see org.springframework.integration.config.GlobalChannelInterceptor#patterns() Defaults to any channel name not matching the Hystrix Stream channel name. +|spring.sleuth.integration.patterns | [!hystrixStreamOutput*, *, !channel*] | An array of patterns against which channel names will be matched. @see org.springframework.integration.config.GlobalChannelInterceptor#patterns() Defaults to any channel name not matching the Hystrix Stream and functional Stream channel names. |spring.sleuth.integration.websockets.enabled | true | Enable tracing for WebSockets. |spring.sleuth.keys.http.headers | | Additional headers that should be added as tags if they exist. If the header value is multi-valued, the tag value will be a comma-separated, single-quoted list. |spring.sleuth.keys.http.prefix | http. | Prefix for header names if they are added as tags. diff --git a/pom.xml b/pom.xml index bf45ea181..d31662c1d 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ 4.0.0 spring-cloud-sleuth - 2.2.2.BUILD-SNAPSHOT + 2.2.2.RELEASE pom Spring Cloud Sleuth Spring Cloud Sleuth @@ -29,7 +29,7 @@ org.springframework.cloud spring-cloud-build - 2.2.2.BUILD-SNAPSHOT + 2.2.3.RELEASE @@ -250,16 +250,16 @@ 1.8 1.8 1.8 - 2.2.2.BUILD-SNAPSHOT - 2.2.2.BUILD-SNAPSHOT - 2.2.2.BUILD-SNAPSHOT - 1.0.1.BUILD-SNAPSHOT - Horsham.BUILD-SNAPSHOT - 2.2.2.BUILD-SNAPSHOT - 2.2.2.BUILD-SNAPSHOT + 2.2.3.RELEASE + 2.2.2.RELEASE + 2.2.2.RELEASE + 1.0.2.RELEASE + Horsham.SR3 + 2.2.2.RELEASE + 2.2.2.RELEASE 5.10.1 2.1.7.RELEASE - 2.2.2.BUILD-SNAPSHOT + 2.2.1.RELEASE false 3.14.6 3.14.6 diff --git a/spring-cloud-sleuth-core/pom.xml b/spring-cloud-sleuth-core/pom.xml index af72b90f3..b1bea4f85 100644 --- a/spring-cloud-sleuth-core/pom.xml +++ b/spring-cloud-sleuth-core/pom.xml @@ -31,7 +31,7 @@ org.springframework.cloud spring-cloud-sleuth - 2.2.2.BUILD-SNAPSHOT + 2.2.2.RELEASE .. diff --git a/spring-cloud-sleuth-dependencies/.flattened-pom.xml b/spring-cloud-sleuth-dependencies/.flattened-pom.xml new file mode 100644 index 000000000..80f9738e2 --- /dev/null +++ b/spring-cloud-sleuth-dependencies/.flattened-pom.xml @@ -0,0 +1,203 @@ + + + + 4.0.0 + + org.springframework.cloud + spring-cloud-dependencies-parent + 2.2.3.RELEASE + + + org.springframework.cloud + spring-cloud-sleuth-dependencies + 2.2.2.RELEASE + pom + spring-cloud-sleuth-dependencies + Spring Cloud Sleuth Dependencies + https://projects.spring.io/spring-cloud/spring-cloud-sleuth-dependencies/ + + Pivotal Software, Inc. + https://www.spring.io + + + + Apache License, Version 2.0 + https://www.apache.org/licenses/LICENSE-2.0 + Copyright 2014-2015 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. + + + + + dsyer + Dave Syer + dsyer at pivotal.io + Pivotal Software, Inc. + https://www.spring.io + + Project lead + + + + sgibb + Spencer Gibb + sgibb at pivotal.io + Pivotal Software, Inc. + https://www.spring.io + + Project lead + + + + + scm:git:git://github.com/spring-cloud/spring-cloud-build.git/spring-cloud-sleuth-dependencies + scm:git:ssh://git@github.com/spring-cloud/spring-cloud-build.git/spring-cloud-sleuth-dependencies + https://github.com/spring-cloud/spring-cloud-build/spring-cloud-sleuth-dependencies + + + + repo.spring.io + Spring Release Repository + https://repo.spring.io/libs-release-local + + + repo.spring.io + Spring Snapshot Repository + https://repo.spring.io/libs-snapshot-local + + + spring-docs + scp://static.springframework.org/var/www/domains/springframework.org/static/htdocs/spring-cloud/docs/spring-cloud-dependencies-parent/2.2.3.RELEASE/spring-cloud-sleuth-dependencies + + https://github.com/spring-cloud + + + 0.35.1 + 3.4.1 + 5.10.1 + + + + + org.springframework.cloud + spring-cloud-sleuth-core + ${project.version} + + + org.springframework.cloud + spring-cloud-sleuth-zipkin + ${project.version} + + + org.springframework.cloud + spring-cloud-starter-zipkin + ${project.version} + + + org.springframework.cloud + spring-cloud-starter-sleuth + ${project.version} + + + io.zipkin.brave + brave-bom + ${brave.version} + pom + import + + + io.opentracing.brave + brave-opentracing + ${brave.opentracing.version} + + + io.github.lognet + grpc-spring-boot-starter + ${grpc.spring.boot.version} + + + + + + spring + + + + false + + + true + + spring-snapshots + Spring Snapshots + https://repo.spring.io/libs-snapshot-local + + + + false + + spring-milestones + Spring Milestones + https://repo.spring.io/libs-milestone-local + + + + false + + spring-releases + Spring Releases + https://repo.spring.io/release + + + + + + false + + + true + + spring-snapshots + Spring Snapshots + https://repo.spring.io/libs-snapshot-local + + + + false + + spring-milestones + Spring Milestones + https://repo.spring.io/libs-milestone-local + + + + + diff --git a/spring-cloud-sleuth-dependencies/pom.xml b/spring-cloud-sleuth-dependencies/pom.xml index f71dfc761..1f62a7434 100644 --- a/spring-cloud-sleuth-dependencies/pom.xml +++ b/spring-cloud-sleuth-dependencies/pom.xml @@ -22,11 +22,11 @@ spring-cloud-dependencies-parent org.springframework.cloud - 2.2.1.RELEASE + 2.2.3.RELEASE spring-cloud-sleuth-dependencies - 2.2.2.BUILD-SNAPSHOT + 2.2.2.RELEASE pom spring-cloud-sleuth-dependencies Spring Cloud Sleuth Dependencies diff --git a/spring-cloud-sleuth-samples/pom.xml b/spring-cloud-sleuth-samples/pom.xml index 0390daa62..ebee961b8 100644 --- a/spring-cloud-sleuth-samples/pom.xml +++ b/spring-cloud-sleuth-samples/pom.xml @@ -28,7 +28,7 @@ org.springframework.cloud spring-cloud-sleuth - 2.2.2.BUILD-SNAPSHOT + 2.2.2.RELEASE .. diff --git a/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-feign/pom.xml b/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-feign/pom.xml index f9b6f6a2a..71b020c42 100644 --- a/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-feign/pom.xml +++ b/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-feign/pom.xml @@ -28,7 +28,7 @@ org.springframework.cloud spring-cloud-sleuth-samples - 2.2.2.BUILD-SNAPSHOT + 2.2.2.RELEASE .. diff --git a/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-messaging/pom.xml b/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-messaging/pom.xml index 6a83d881c..89c13a0ba 100644 --- a/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-messaging/pom.xml +++ b/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-messaging/pom.xml @@ -28,7 +28,7 @@ org.springframework.cloud spring-cloud-sleuth-samples - 2.2.2.BUILD-SNAPSHOT + 2.2.2.RELEASE .. diff --git a/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-ribbon/pom.xml b/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-ribbon/pom.xml index 428307d5f..2a24cdd75 100644 --- a/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-ribbon/pom.xml +++ b/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-ribbon/pom.xml @@ -28,7 +28,7 @@ org.springframework.cloud spring-cloud-sleuth-samples - 2.2.2.BUILD-SNAPSHOT + 2.2.2.RELEASE .. diff --git a/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-test-core/pom.xml b/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-test-core/pom.xml index 9469ac2c4..46ecc798b 100644 --- a/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-test-core/pom.xml +++ b/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-test-core/pom.xml @@ -28,7 +28,7 @@ org.springframework.cloud spring-cloud-sleuth-samples - 2.2.2.BUILD-SNAPSHOT + 2.2.2.RELEASE .. diff --git a/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-websocket/pom.xml b/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-websocket/pom.xml index d4f15e8ae..aed06a3aa 100644 --- a/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-websocket/pom.xml +++ b/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-websocket/pom.xml @@ -28,7 +28,7 @@ org.springframework.cloud spring-cloud-sleuth-samples - 2.2.2.BUILD-SNAPSHOT + 2.2.2.RELEASE .. diff --git a/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-zipkin/pom.xml b/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-zipkin/pom.xml index a71e7e406..928a4e8fc 100644 --- a/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-zipkin/pom.xml +++ b/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-zipkin/pom.xml @@ -28,7 +28,7 @@ org.springframework.cloud spring-cloud-sleuth-samples - 2.2.2.BUILD-SNAPSHOT + 2.2.2.RELEASE .. diff --git a/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample/pom.xml b/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample/pom.xml index 0867149df..58d020906 100644 --- a/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample/pom.xml +++ b/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample/pom.xml @@ -28,7 +28,7 @@ org.springframework.cloud spring-cloud-sleuth-samples - 2.2.2.BUILD-SNAPSHOT + 2.2.2.RELEASE .. diff --git a/spring-cloud-sleuth-zipkin/pom.xml b/spring-cloud-sleuth-zipkin/pom.xml index 5412d198f..9c9f1eb69 100644 --- a/spring-cloud-sleuth-zipkin/pom.xml +++ b/spring-cloud-sleuth-zipkin/pom.xml @@ -28,7 +28,7 @@ org.springframework.cloud spring-cloud-sleuth - 2.2.2.BUILD-SNAPSHOT + 2.2.2.RELEASE .. diff --git a/spring-cloud-starter-sleuth/pom.xml b/spring-cloud-starter-sleuth/pom.xml index a19c15fd5..5164914c8 100644 --- a/spring-cloud-starter-sleuth/pom.xml +++ b/spring-cloud-starter-sleuth/pom.xml @@ -22,7 +22,7 @@ org.springframework.cloud spring-cloud-sleuth - 2.2.2.BUILD-SNAPSHOT + 2.2.2.RELEASE .. spring-cloud-starter-sleuth diff --git a/spring-cloud-starter-zipkin/pom.xml b/spring-cloud-starter-zipkin/pom.xml index 22f67d6c4..2a45d7d65 100644 --- a/spring-cloud-starter-zipkin/pom.xml +++ b/spring-cloud-starter-zipkin/pom.xml @@ -22,7 +22,7 @@ org.springframework.cloud spring-cloud-sleuth - 2.2.2.BUILD-SNAPSHOT + 2.2.2.RELEASE .. spring-cloud-starter-zipkin diff --git a/tests/pom.xml b/tests/pom.xml index d08eba732..b195b4d58 100644 --- a/tests/pom.xml +++ b/tests/pom.xml @@ -30,7 +30,7 @@ org.springframework.cloud spring-cloud-sleuth - 2.2.2.BUILD-SNAPSHOT + 2.2.2.RELEASE .. diff --git a/tests/spring-cloud-sleuth-instrumentation-async-tests/pom.xml b/tests/spring-cloud-sleuth-instrumentation-async-tests/pom.xml index 83b5c30cb..114672696 100644 --- a/tests/spring-cloud-sleuth-instrumentation-async-tests/pom.xml +++ b/tests/spring-cloud-sleuth-instrumentation-async-tests/pom.xml @@ -30,7 +30,7 @@ org.springframework.cloud spring-cloud-sleuth-tests - 2.2.2.BUILD-SNAPSHOT + 2.2.2.RELEASE .. diff --git a/tests/spring-cloud-sleuth-instrumentation-feign-tests/pom.xml b/tests/spring-cloud-sleuth-instrumentation-feign-tests/pom.xml index 17cf6232b..68f04b1a4 100644 --- a/tests/spring-cloud-sleuth-instrumentation-feign-tests/pom.xml +++ b/tests/spring-cloud-sleuth-instrumentation-feign-tests/pom.xml @@ -30,7 +30,7 @@ org.springframework.cloud spring-cloud-sleuth-tests - 2.2.2.BUILD-SNAPSHOT + 2.2.2.RELEASE .. diff --git a/tests/spring-cloud-sleuth-instrumentation-grpc-tests/pom.xml b/tests/spring-cloud-sleuth-instrumentation-grpc-tests/pom.xml index df04dc0fb..636adb7fa 100644 --- a/tests/spring-cloud-sleuth-instrumentation-grpc-tests/pom.xml +++ b/tests/spring-cloud-sleuth-instrumentation-grpc-tests/pom.xml @@ -30,7 +30,7 @@ org.springframework.cloud spring-cloud-sleuth-tests - 2.2.2.BUILD-SNAPSHOT + 2.2.2.RELEASE .. diff --git a/tests/spring-cloud-sleuth-instrumentation-hystrix-tests/pom.xml b/tests/spring-cloud-sleuth-instrumentation-hystrix-tests/pom.xml index a6d6c31da..9fbadfc8d 100644 --- a/tests/spring-cloud-sleuth-instrumentation-hystrix-tests/pom.xml +++ b/tests/spring-cloud-sleuth-instrumentation-hystrix-tests/pom.xml @@ -30,7 +30,7 @@ org.springframework.cloud spring-cloud-sleuth-tests - 2.2.2.BUILD-SNAPSHOT + 2.2.2.RELEASE .. diff --git a/tests/spring-cloud-sleuth-instrumentation-lettuce-tests/pom.xml b/tests/spring-cloud-sleuth-instrumentation-lettuce-tests/pom.xml index 0efc8054a..b365814c5 100644 --- a/tests/spring-cloud-sleuth-instrumentation-lettuce-tests/pom.xml +++ b/tests/spring-cloud-sleuth-instrumentation-lettuce-tests/pom.xml @@ -30,7 +30,7 @@ org.springframework.cloud spring-cloud-sleuth-tests - 2.2.2.BUILD-SNAPSHOT + 2.2.2.RELEASE .. diff --git a/tests/spring-cloud-sleuth-instrumentation-messaging-tests/pom.xml b/tests/spring-cloud-sleuth-instrumentation-messaging-tests/pom.xml index 9133fe704..1d9a16729 100644 --- a/tests/spring-cloud-sleuth-instrumentation-messaging-tests/pom.xml +++ b/tests/spring-cloud-sleuth-instrumentation-messaging-tests/pom.xml @@ -31,7 +31,7 @@ https://www.w3.org/2001/XMLSchema-instance "> org.springframework.cloud spring-cloud-sleuth-tests - 2.2.2.BUILD-SNAPSHOT + 2.2.2.RELEASE .. diff --git a/tests/spring-cloud-sleuth-instrumentation-mvc-tests/pom.xml b/tests/spring-cloud-sleuth-instrumentation-mvc-tests/pom.xml index 8e2163a5d..b26cc3771 100644 --- a/tests/spring-cloud-sleuth-instrumentation-mvc-tests/pom.xml +++ b/tests/spring-cloud-sleuth-instrumentation-mvc-tests/pom.xml @@ -30,7 +30,7 @@ org.springframework.cloud spring-cloud-sleuth-tests - 2.2.2.BUILD-SNAPSHOT + 2.2.2.RELEASE .. diff --git a/tests/spring-cloud-sleuth-instrumentation-reactor-tests/pom.xml b/tests/spring-cloud-sleuth-instrumentation-reactor-tests/pom.xml index 85fd25178..97af4fdec 100644 --- a/tests/spring-cloud-sleuth-instrumentation-reactor-tests/pom.xml +++ b/tests/spring-cloud-sleuth-instrumentation-reactor-tests/pom.xml @@ -30,7 +30,7 @@ org.springframework.cloud spring-cloud-sleuth-tests - 2.2.2.BUILD-SNAPSHOT + 2.2.2.RELEASE .. diff --git a/tests/spring-cloud-sleuth-instrumentation-rpc-tests/pom.xml b/tests/spring-cloud-sleuth-instrumentation-rpc-tests/pom.xml index 60c648ac3..4853325d8 100644 --- a/tests/spring-cloud-sleuth-instrumentation-rpc-tests/pom.xml +++ b/tests/spring-cloud-sleuth-instrumentation-rpc-tests/pom.xml @@ -30,7 +30,7 @@ org.springframework.cloud spring-cloud-sleuth-tests - 2.2.2.BUILD-SNAPSHOT + 2.2.2.RELEASE .. diff --git a/tests/spring-cloud-sleuth-instrumentation-rxjava-tests/pom.xml b/tests/spring-cloud-sleuth-instrumentation-rxjava-tests/pom.xml index 1835a004a..21d623804 100644 --- a/tests/spring-cloud-sleuth-instrumentation-rxjava-tests/pom.xml +++ b/tests/spring-cloud-sleuth-instrumentation-rxjava-tests/pom.xml @@ -30,7 +30,7 @@ org.springframework.cloud spring-cloud-sleuth-tests - 2.2.2.BUILD-SNAPSHOT + 2.2.2.RELEASE .. diff --git a/tests/spring-cloud-sleuth-instrumentation-scheduling-tests/pom.xml b/tests/spring-cloud-sleuth-instrumentation-scheduling-tests/pom.xml index edb74b25f..3b9cb74e5 100644 --- a/tests/spring-cloud-sleuth-instrumentation-scheduling-tests/pom.xml +++ b/tests/spring-cloud-sleuth-instrumentation-scheduling-tests/pom.xml @@ -30,7 +30,7 @@ org.springframework.cloud spring-cloud-sleuth-tests - 2.2.2.BUILD-SNAPSHOT + 2.2.2.RELEASE .. diff --git a/tests/spring-cloud-sleuth-instrumentation-webflux-tests/pom.xml b/tests/spring-cloud-sleuth-instrumentation-webflux-tests/pom.xml index 2d4c79a35..dbf1a21e5 100644 --- a/tests/spring-cloud-sleuth-instrumentation-webflux-tests/pom.xml +++ b/tests/spring-cloud-sleuth-instrumentation-webflux-tests/pom.xml @@ -30,7 +30,7 @@ org.springframework.cloud spring-cloud-sleuth-tests - 2.2.2.BUILD-SNAPSHOT + 2.2.2.RELEASE .. diff --git a/tests/spring-cloud-sleuth-instrumentation-zuul-tests/pom.xml b/tests/spring-cloud-sleuth-instrumentation-zuul-tests/pom.xml index 192aff8d3..6bb96318c 100644 --- a/tests/spring-cloud-sleuth-instrumentation-zuul-tests/pom.xml +++ b/tests/spring-cloud-sleuth-instrumentation-zuul-tests/pom.xml @@ -30,7 +30,7 @@ org.springframework.cloud spring-cloud-sleuth-tests - 2.2.2.BUILD-SNAPSHOT + 2.2.2.RELEASE .. From 5dd714da5c156b1e48bef30c7082d6e394fdf773 Mon Sep 17 00:00:00 2001 From: buildmaster Date: Wed, 4 Mar 2020 16:59:42 +0000 Subject: [PATCH 2/4] Going back to snapshots --- README.adoc | 3 - benchmarks/pom.xml | 4 +- docs/pom.xml | 2 +- docs/src/main/asciidoc/_configprops.adoc | 4 +- pom.xml | 20 +- spring-cloud-sleuth-core/pom.xml | 2 +- .../.flattened-pom.xml | 203 ------------------ spring-cloud-sleuth-dependencies/pom.xml | 4 +- spring-cloud-sleuth-samples/pom.xml | 2 +- .../spring-cloud-sleuth-sample-feign/pom.xml | 2 +- .../pom.xml | 2 +- .../spring-cloud-sleuth-sample-ribbon/pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../spring-cloud-sleuth-sample-zipkin/pom.xml | 2 +- .../spring-cloud-sleuth-sample/pom.xml | 2 +- spring-cloud-sleuth-zipkin/pom.xml | 2 +- spring-cloud-starter-sleuth/pom.xml | 2 +- spring-cloud-starter-zipkin/pom.xml | 2 +- tests/pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- 33 files changed, 43 insertions(+), 249 deletions(-) delete mode 100644 spring-cloud-sleuth-dependencies/.flattened-pom.xml diff --git a/README.adoc b/README.adoc index 78e9c7dfe..71493d83d 100644 --- a/README.adoc +++ b/README.adoc @@ -307,7 +307,6 @@ Consider the following example of a Logback configuration file (named https://gi "span": "%X{X-B3-SpanId:-}", "parent": "%X{X-B3-ParentSpanId:-}", "exportable": "%X{X-Span-Export:-}", - "baggage": "%X{key:-}", "pid": "${PID:-}", "thread": "%thread", "class": "%logger{40}", @@ -889,7 +888,6 @@ Checkstyle rules are *disabled by default*. To add checkstyle to your project ju spring-javaformat-maven-plugin <5> - org.apache.maven.plugins maven-checkstyle-plugin @@ -897,7 +895,6 @@ Checkstyle rules are *disabled by default*. To add checkstyle to your project ju <5> - org.apache.maven.plugins maven-checkstyle-plugin diff --git a/benchmarks/pom.xml b/benchmarks/pom.xml index 98ab380b7..3d95f0dcc 100644 --- a/benchmarks/pom.xml +++ b/benchmarks/pom.xml @@ -22,7 +22,7 @@ Benchmarks Benchmarks (JMH) org.springframework.cloud - 2.2.2.RELEASE + 2.2.2.BUILD-SNAPSHOT benchmarks @@ -32,7 +32,7 @@ true 1.8 1.8 - 2.2.5.RELEASE + 2.3.0.BUILD-SNAPSHOT 5.10.1 3.14.6 diff --git a/docs/pom.xml b/docs/pom.xml index 157d9da60..45c220e0d 100644 --- a/docs/pom.xml +++ b/docs/pom.xml @@ -22,7 +22,7 @@ org.springframework.cloud spring-cloud-sleuth - 2.2.2.RELEASE + 2.2.2.BUILD-SNAPSHOT spring-cloud-sleuth-docs pom diff --git a/docs/src/main/asciidoc/_configprops.adoc b/docs/src/main/asciidoc/_configprops.adoc index 4b7ff8d51..2692e0e3c 100644 --- a/docs/src/main/asciidoc/_configprops.adoc +++ b/docs/src/main/asciidoc/_configprops.adoc @@ -12,11 +12,11 @@ |spring.sleuth.feign.processor.enabled | true | Enable post processor that wraps Feign Context in its tracing representations. |spring.sleuth.grpc.enabled | true | Enable span information propagation when using GRPC. |spring.sleuth.http.enabled | true | -|spring.sleuth.http.legacy.enabled | false | +|spring.sleuth.http.legacy.enabled | false | Enables the legacy Sleuth setup. |spring.sleuth.hystrix.strategy.enabled | true | Enable custom HystrixConcurrencyStrategy that wraps all Callable instances into their Sleuth representative - the TraceCallable. |spring.sleuth.hystrix.strategy.passthrough | false | When enabled the tracing information is passed to the Hystrix execution threads but spans are not created for each execution. |spring.sleuth.integration.enabled | true | Enable Spring Integration sleuth instrumentation. -|spring.sleuth.integration.patterns | [!hystrixStreamOutput*, *, !channel*] | An array of patterns against which channel names will be matched. @see org.springframework.integration.config.GlobalChannelInterceptor#patterns() Defaults to any channel name not matching the Hystrix Stream and functional Stream channel names. +|spring.sleuth.integration.patterns | [!hystrixStreamOutput*, *] | An array of patterns against which channel names will be matched. @see org.springframework.integration.config.GlobalChannelInterceptor#patterns() Defaults to any channel name not matching the Hystrix Stream channel name. |spring.sleuth.integration.websockets.enabled | true | Enable tracing for WebSockets. |spring.sleuth.keys.http.headers | | Additional headers that should be added as tags if they exist. If the header value is multi-valued, the tag value will be a comma-separated, single-quoted list. |spring.sleuth.keys.http.prefix | http. | Prefix for header names if they are added as tags. diff --git a/pom.xml b/pom.xml index d31662c1d..bf45ea181 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ 4.0.0 spring-cloud-sleuth - 2.2.2.RELEASE + 2.2.2.BUILD-SNAPSHOT pom Spring Cloud Sleuth Spring Cloud Sleuth @@ -29,7 +29,7 @@ org.springframework.cloud spring-cloud-build - 2.2.3.RELEASE + 2.2.2.BUILD-SNAPSHOT @@ -250,16 +250,16 @@ 1.8 1.8 1.8 - 2.2.3.RELEASE - 2.2.2.RELEASE - 2.2.2.RELEASE - 1.0.2.RELEASE - Horsham.SR3 - 2.2.2.RELEASE - 2.2.2.RELEASE + 2.2.2.BUILD-SNAPSHOT + 2.2.2.BUILD-SNAPSHOT + 2.2.2.BUILD-SNAPSHOT + 1.0.1.BUILD-SNAPSHOT + Horsham.BUILD-SNAPSHOT + 2.2.2.BUILD-SNAPSHOT + 2.2.2.BUILD-SNAPSHOT 5.10.1 2.1.7.RELEASE - 2.2.1.RELEASE + 2.2.2.BUILD-SNAPSHOT false 3.14.6 3.14.6 diff --git a/spring-cloud-sleuth-core/pom.xml b/spring-cloud-sleuth-core/pom.xml index b1bea4f85..af72b90f3 100644 --- a/spring-cloud-sleuth-core/pom.xml +++ b/spring-cloud-sleuth-core/pom.xml @@ -31,7 +31,7 @@ org.springframework.cloud spring-cloud-sleuth - 2.2.2.RELEASE + 2.2.2.BUILD-SNAPSHOT .. diff --git a/spring-cloud-sleuth-dependencies/.flattened-pom.xml b/spring-cloud-sleuth-dependencies/.flattened-pom.xml deleted file mode 100644 index 80f9738e2..000000000 --- a/spring-cloud-sleuth-dependencies/.flattened-pom.xml +++ /dev/null @@ -1,203 +0,0 @@ - - - - 4.0.0 - - org.springframework.cloud - spring-cloud-dependencies-parent - 2.2.3.RELEASE - - - org.springframework.cloud - spring-cloud-sleuth-dependencies - 2.2.2.RELEASE - pom - spring-cloud-sleuth-dependencies - Spring Cloud Sleuth Dependencies - https://projects.spring.io/spring-cloud/spring-cloud-sleuth-dependencies/ - - Pivotal Software, Inc. - https://www.spring.io - - - - Apache License, Version 2.0 - https://www.apache.org/licenses/LICENSE-2.0 - Copyright 2014-2015 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. - - - - - dsyer - Dave Syer - dsyer at pivotal.io - Pivotal Software, Inc. - https://www.spring.io - - Project lead - - - - sgibb - Spencer Gibb - sgibb at pivotal.io - Pivotal Software, Inc. - https://www.spring.io - - Project lead - - - - - scm:git:git://github.com/spring-cloud/spring-cloud-build.git/spring-cloud-sleuth-dependencies - scm:git:ssh://git@github.com/spring-cloud/spring-cloud-build.git/spring-cloud-sleuth-dependencies - https://github.com/spring-cloud/spring-cloud-build/spring-cloud-sleuth-dependencies - - - - repo.spring.io - Spring Release Repository - https://repo.spring.io/libs-release-local - - - repo.spring.io - Spring Snapshot Repository - https://repo.spring.io/libs-snapshot-local - - - spring-docs - scp://static.springframework.org/var/www/domains/springframework.org/static/htdocs/spring-cloud/docs/spring-cloud-dependencies-parent/2.2.3.RELEASE/spring-cloud-sleuth-dependencies - - https://github.com/spring-cloud - - - 0.35.1 - 3.4.1 - 5.10.1 - - - - - org.springframework.cloud - spring-cloud-sleuth-core - ${project.version} - - - org.springframework.cloud - spring-cloud-sleuth-zipkin - ${project.version} - - - org.springframework.cloud - spring-cloud-starter-zipkin - ${project.version} - - - org.springframework.cloud - spring-cloud-starter-sleuth - ${project.version} - - - io.zipkin.brave - brave-bom - ${brave.version} - pom - import - - - io.opentracing.brave - brave-opentracing - ${brave.opentracing.version} - - - io.github.lognet - grpc-spring-boot-starter - ${grpc.spring.boot.version} - - - - - - spring - - - - false - - - true - - spring-snapshots - Spring Snapshots - https://repo.spring.io/libs-snapshot-local - - - - false - - spring-milestones - Spring Milestones - https://repo.spring.io/libs-milestone-local - - - - false - - spring-releases - Spring Releases - https://repo.spring.io/release - - - - - - false - - - true - - spring-snapshots - Spring Snapshots - https://repo.spring.io/libs-snapshot-local - - - - false - - spring-milestones - Spring Milestones - https://repo.spring.io/libs-milestone-local - - - - - diff --git a/spring-cloud-sleuth-dependencies/pom.xml b/spring-cloud-sleuth-dependencies/pom.xml index 1f62a7434..f71dfc761 100644 --- a/spring-cloud-sleuth-dependencies/pom.xml +++ b/spring-cloud-sleuth-dependencies/pom.xml @@ -22,11 +22,11 @@ spring-cloud-dependencies-parent org.springframework.cloud - 2.2.3.RELEASE + 2.2.1.RELEASE spring-cloud-sleuth-dependencies - 2.2.2.RELEASE + 2.2.2.BUILD-SNAPSHOT pom spring-cloud-sleuth-dependencies Spring Cloud Sleuth Dependencies diff --git a/spring-cloud-sleuth-samples/pom.xml b/spring-cloud-sleuth-samples/pom.xml index ebee961b8..0390daa62 100644 --- a/spring-cloud-sleuth-samples/pom.xml +++ b/spring-cloud-sleuth-samples/pom.xml @@ -28,7 +28,7 @@ org.springframework.cloud spring-cloud-sleuth - 2.2.2.RELEASE + 2.2.2.BUILD-SNAPSHOT .. diff --git a/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-feign/pom.xml b/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-feign/pom.xml index 71b020c42..f9b6f6a2a 100644 --- a/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-feign/pom.xml +++ b/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-feign/pom.xml @@ -28,7 +28,7 @@ org.springframework.cloud spring-cloud-sleuth-samples - 2.2.2.RELEASE + 2.2.2.BUILD-SNAPSHOT .. diff --git a/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-messaging/pom.xml b/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-messaging/pom.xml index 89c13a0ba..6a83d881c 100644 --- a/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-messaging/pom.xml +++ b/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-messaging/pom.xml @@ -28,7 +28,7 @@ org.springframework.cloud spring-cloud-sleuth-samples - 2.2.2.RELEASE + 2.2.2.BUILD-SNAPSHOT .. diff --git a/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-ribbon/pom.xml b/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-ribbon/pom.xml index 2a24cdd75..428307d5f 100644 --- a/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-ribbon/pom.xml +++ b/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-ribbon/pom.xml @@ -28,7 +28,7 @@ org.springframework.cloud spring-cloud-sleuth-samples - 2.2.2.RELEASE + 2.2.2.BUILD-SNAPSHOT .. diff --git a/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-test-core/pom.xml b/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-test-core/pom.xml index 46ecc798b..9469ac2c4 100644 --- a/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-test-core/pom.xml +++ b/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-test-core/pom.xml @@ -28,7 +28,7 @@ org.springframework.cloud spring-cloud-sleuth-samples - 2.2.2.RELEASE + 2.2.2.BUILD-SNAPSHOT .. diff --git a/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-websocket/pom.xml b/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-websocket/pom.xml index aed06a3aa..d4f15e8ae 100644 --- a/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-websocket/pom.xml +++ b/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-websocket/pom.xml @@ -28,7 +28,7 @@ org.springframework.cloud spring-cloud-sleuth-samples - 2.2.2.RELEASE + 2.2.2.BUILD-SNAPSHOT .. diff --git a/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-zipkin/pom.xml b/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-zipkin/pom.xml index 928a4e8fc..a71e7e406 100644 --- a/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-zipkin/pom.xml +++ b/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-zipkin/pom.xml @@ -28,7 +28,7 @@ org.springframework.cloud spring-cloud-sleuth-samples - 2.2.2.RELEASE + 2.2.2.BUILD-SNAPSHOT .. diff --git a/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample/pom.xml b/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample/pom.xml index 58d020906..0867149df 100644 --- a/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample/pom.xml +++ b/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample/pom.xml @@ -28,7 +28,7 @@ org.springframework.cloud spring-cloud-sleuth-samples - 2.2.2.RELEASE + 2.2.2.BUILD-SNAPSHOT .. diff --git a/spring-cloud-sleuth-zipkin/pom.xml b/spring-cloud-sleuth-zipkin/pom.xml index 9c9f1eb69..5412d198f 100644 --- a/spring-cloud-sleuth-zipkin/pom.xml +++ b/spring-cloud-sleuth-zipkin/pom.xml @@ -28,7 +28,7 @@ org.springframework.cloud spring-cloud-sleuth - 2.2.2.RELEASE + 2.2.2.BUILD-SNAPSHOT .. diff --git a/spring-cloud-starter-sleuth/pom.xml b/spring-cloud-starter-sleuth/pom.xml index 5164914c8..a19c15fd5 100644 --- a/spring-cloud-starter-sleuth/pom.xml +++ b/spring-cloud-starter-sleuth/pom.xml @@ -22,7 +22,7 @@ org.springframework.cloud spring-cloud-sleuth - 2.2.2.RELEASE + 2.2.2.BUILD-SNAPSHOT .. spring-cloud-starter-sleuth diff --git a/spring-cloud-starter-zipkin/pom.xml b/spring-cloud-starter-zipkin/pom.xml index 2a45d7d65..22f67d6c4 100644 --- a/spring-cloud-starter-zipkin/pom.xml +++ b/spring-cloud-starter-zipkin/pom.xml @@ -22,7 +22,7 @@ org.springframework.cloud spring-cloud-sleuth - 2.2.2.RELEASE + 2.2.2.BUILD-SNAPSHOT .. spring-cloud-starter-zipkin diff --git a/tests/pom.xml b/tests/pom.xml index b195b4d58..d08eba732 100644 --- a/tests/pom.xml +++ b/tests/pom.xml @@ -30,7 +30,7 @@ org.springframework.cloud spring-cloud-sleuth - 2.2.2.RELEASE + 2.2.2.BUILD-SNAPSHOT .. diff --git a/tests/spring-cloud-sleuth-instrumentation-async-tests/pom.xml b/tests/spring-cloud-sleuth-instrumentation-async-tests/pom.xml index 114672696..83b5c30cb 100644 --- a/tests/spring-cloud-sleuth-instrumentation-async-tests/pom.xml +++ b/tests/spring-cloud-sleuth-instrumentation-async-tests/pom.xml @@ -30,7 +30,7 @@ org.springframework.cloud spring-cloud-sleuth-tests - 2.2.2.RELEASE + 2.2.2.BUILD-SNAPSHOT .. diff --git a/tests/spring-cloud-sleuth-instrumentation-feign-tests/pom.xml b/tests/spring-cloud-sleuth-instrumentation-feign-tests/pom.xml index 68f04b1a4..17cf6232b 100644 --- a/tests/spring-cloud-sleuth-instrumentation-feign-tests/pom.xml +++ b/tests/spring-cloud-sleuth-instrumentation-feign-tests/pom.xml @@ -30,7 +30,7 @@ org.springframework.cloud spring-cloud-sleuth-tests - 2.2.2.RELEASE + 2.2.2.BUILD-SNAPSHOT .. diff --git a/tests/spring-cloud-sleuth-instrumentation-grpc-tests/pom.xml b/tests/spring-cloud-sleuth-instrumentation-grpc-tests/pom.xml index 636adb7fa..df04dc0fb 100644 --- a/tests/spring-cloud-sleuth-instrumentation-grpc-tests/pom.xml +++ b/tests/spring-cloud-sleuth-instrumentation-grpc-tests/pom.xml @@ -30,7 +30,7 @@ org.springframework.cloud spring-cloud-sleuth-tests - 2.2.2.RELEASE + 2.2.2.BUILD-SNAPSHOT .. diff --git a/tests/spring-cloud-sleuth-instrumentation-hystrix-tests/pom.xml b/tests/spring-cloud-sleuth-instrumentation-hystrix-tests/pom.xml index 9fbadfc8d..a6d6c31da 100644 --- a/tests/spring-cloud-sleuth-instrumentation-hystrix-tests/pom.xml +++ b/tests/spring-cloud-sleuth-instrumentation-hystrix-tests/pom.xml @@ -30,7 +30,7 @@ org.springframework.cloud spring-cloud-sleuth-tests - 2.2.2.RELEASE + 2.2.2.BUILD-SNAPSHOT .. diff --git a/tests/spring-cloud-sleuth-instrumentation-lettuce-tests/pom.xml b/tests/spring-cloud-sleuth-instrumentation-lettuce-tests/pom.xml index b365814c5..0efc8054a 100644 --- a/tests/spring-cloud-sleuth-instrumentation-lettuce-tests/pom.xml +++ b/tests/spring-cloud-sleuth-instrumentation-lettuce-tests/pom.xml @@ -30,7 +30,7 @@ org.springframework.cloud spring-cloud-sleuth-tests - 2.2.2.RELEASE + 2.2.2.BUILD-SNAPSHOT .. diff --git a/tests/spring-cloud-sleuth-instrumentation-messaging-tests/pom.xml b/tests/spring-cloud-sleuth-instrumentation-messaging-tests/pom.xml index 1d9a16729..9133fe704 100644 --- a/tests/spring-cloud-sleuth-instrumentation-messaging-tests/pom.xml +++ b/tests/spring-cloud-sleuth-instrumentation-messaging-tests/pom.xml @@ -31,7 +31,7 @@ https://www.w3.org/2001/XMLSchema-instance "> org.springframework.cloud spring-cloud-sleuth-tests - 2.2.2.RELEASE + 2.2.2.BUILD-SNAPSHOT .. diff --git a/tests/spring-cloud-sleuth-instrumentation-mvc-tests/pom.xml b/tests/spring-cloud-sleuth-instrumentation-mvc-tests/pom.xml index b26cc3771..8e2163a5d 100644 --- a/tests/spring-cloud-sleuth-instrumentation-mvc-tests/pom.xml +++ b/tests/spring-cloud-sleuth-instrumentation-mvc-tests/pom.xml @@ -30,7 +30,7 @@ org.springframework.cloud spring-cloud-sleuth-tests - 2.2.2.RELEASE + 2.2.2.BUILD-SNAPSHOT .. diff --git a/tests/spring-cloud-sleuth-instrumentation-reactor-tests/pom.xml b/tests/spring-cloud-sleuth-instrumentation-reactor-tests/pom.xml index 97af4fdec..85fd25178 100644 --- a/tests/spring-cloud-sleuth-instrumentation-reactor-tests/pom.xml +++ b/tests/spring-cloud-sleuth-instrumentation-reactor-tests/pom.xml @@ -30,7 +30,7 @@ org.springframework.cloud spring-cloud-sleuth-tests - 2.2.2.RELEASE + 2.2.2.BUILD-SNAPSHOT .. diff --git a/tests/spring-cloud-sleuth-instrumentation-rpc-tests/pom.xml b/tests/spring-cloud-sleuth-instrumentation-rpc-tests/pom.xml index 4853325d8..60c648ac3 100644 --- a/tests/spring-cloud-sleuth-instrumentation-rpc-tests/pom.xml +++ b/tests/spring-cloud-sleuth-instrumentation-rpc-tests/pom.xml @@ -30,7 +30,7 @@ org.springframework.cloud spring-cloud-sleuth-tests - 2.2.2.RELEASE + 2.2.2.BUILD-SNAPSHOT .. diff --git a/tests/spring-cloud-sleuth-instrumentation-rxjava-tests/pom.xml b/tests/spring-cloud-sleuth-instrumentation-rxjava-tests/pom.xml index 21d623804..1835a004a 100644 --- a/tests/spring-cloud-sleuth-instrumentation-rxjava-tests/pom.xml +++ b/tests/spring-cloud-sleuth-instrumentation-rxjava-tests/pom.xml @@ -30,7 +30,7 @@ org.springframework.cloud spring-cloud-sleuth-tests - 2.2.2.RELEASE + 2.2.2.BUILD-SNAPSHOT .. diff --git a/tests/spring-cloud-sleuth-instrumentation-scheduling-tests/pom.xml b/tests/spring-cloud-sleuth-instrumentation-scheduling-tests/pom.xml index 3b9cb74e5..edb74b25f 100644 --- a/tests/spring-cloud-sleuth-instrumentation-scheduling-tests/pom.xml +++ b/tests/spring-cloud-sleuth-instrumentation-scheduling-tests/pom.xml @@ -30,7 +30,7 @@ org.springframework.cloud spring-cloud-sleuth-tests - 2.2.2.RELEASE + 2.2.2.BUILD-SNAPSHOT .. diff --git a/tests/spring-cloud-sleuth-instrumentation-webflux-tests/pom.xml b/tests/spring-cloud-sleuth-instrumentation-webflux-tests/pom.xml index dbf1a21e5..2d4c79a35 100644 --- a/tests/spring-cloud-sleuth-instrumentation-webflux-tests/pom.xml +++ b/tests/spring-cloud-sleuth-instrumentation-webflux-tests/pom.xml @@ -30,7 +30,7 @@ org.springframework.cloud spring-cloud-sleuth-tests - 2.2.2.RELEASE + 2.2.2.BUILD-SNAPSHOT .. diff --git a/tests/spring-cloud-sleuth-instrumentation-zuul-tests/pom.xml b/tests/spring-cloud-sleuth-instrumentation-zuul-tests/pom.xml index 6bb96318c..192aff8d3 100644 --- a/tests/spring-cloud-sleuth-instrumentation-zuul-tests/pom.xml +++ b/tests/spring-cloud-sleuth-instrumentation-zuul-tests/pom.xml @@ -30,7 +30,7 @@ org.springframework.cloud spring-cloud-sleuth-tests - 2.2.2.RELEASE + 2.2.2.BUILD-SNAPSHOT .. From 2674fba17177d6ddfd21a8f256ff13a37bd1d1fd Mon Sep 17 00:00:00 2001 From: buildmaster Date: Wed, 4 Mar 2020 16:59:42 +0000 Subject: [PATCH 3/4] Bumping versions to 2.2.3.BUILD-SNAPSHOT after release --- benchmarks/pom.xml | 4 ++-- docs/pom.xml | 2 +- pom.xml | 20 +++++++++---------- spring-cloud-sleuth-core/pom.xml | 2 +- spring-cloud-sleuth-dependencies/pom.xml | 4 ++-- spring-cloud-sleuth-samples/pom.xml | 2 +- .../spring-cloud-sleuth-sample-feign/pom.xml | 2 +- .../pom.xml | 2 +- .../spring-cloud-sleuth-sample-ribbon/pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../spring-cloud-sleuth-sample-zipkin/pom.xml | 2 +- .../spring-cloud-sleuth-sample/pom.xml | 2 +- spring-cloud-sleuth-zipkin/pom.xml | 2 +- spring-cloud-starter-sleuth/pom.xml | 2 +- spring-cloud-starter-zipkin/pom.xml | 2 +- tests/pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- 30 files changed, 41 insertions(+), 41 deletions(-) diff --git a/benchmarks/pom.xml b/benchmarks/pom.xml index 3d95f0dcc..96fed1067 100644 --- a/benchmarks/pom.xml +++ b/benchmarks/pom.xml @@ -22,7 +22,7 @@ Benchmarks Benchmarks (JMH) org.springframework.cloud - 2.2.2.BUILD-SNAPSHOT + 2.2.3.BUILD-SNAPSHOT benchmarks @@ -32,7 +32,7 @@ true 1.8 1.8 - 2.3.0.BUILD-SNAPSHOT + 2.2.5.RELEASE 5.10.1 3.14.6 diff --git a/docs/pom.xml b/docs/pom.xml index 45c220e0d..8484894e7 100644 --- a/docs/pom.xml +++ b/docs/pom.xml @@ -22,7 +22,7 @@ org.springframework.cloud spring-cloud-sleuth - 2.2.2.BUILD-SNAPSHOT + 2.2.3.BUILD-SNAPSHOT spring-cloud-sleuth-docs pom diff --git a/pom.xml b/pom.xml index bf45ea181..52def603e 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ 4.0.0 spring-cloud-sleuth - 2.2.2.BUILD-SNAPSHOT + 2.2.3.BUILD-SNAPSHOT pom Spring Cloud Sleuth Spring Cloud Sleuth @@ -29,7 +29,7 @@ org.springframework.cloud spring-cloud-build - 2.2.2.BUILD-SNAPSHOT + 2.2.3.RELEASE @@ -250,16 +250,16 @@ 1.8 1.8 1.8 - 2.2.2.BUILD-SNAPSHOT - 2.2.2.BUILD-SNAPSHOT - 2.2.2.BUILD-SNAPSHOT - 1.0.1.BUILD-SNAPSHOT - Horsham.BUILD-SNAPSHOT - 2.2.2.BUILD-SNAPSHOT - 2.2.2.BUILD-SNAPSHOT + 2.2.3.RELEASE + 2.2.3.BUILD-SNAPSHOT + 2.2.3.BUILD-SNAPSHOT + 1.0.3.BUILD-SNAPSHOT + Horsham.SR3 + 2.2.3.BUILD-SNAPSHOT + 2.2.3.BUILD-SNAPSHOT 5.10.1 2.1.7.RELEASE - 2.2.2.BUILD-SNAPSHOT + 2.2.1.RELEASE false 3.14.6 3.14.6 diff --git a/spring-cloud-sleuth-core/pom.xml b/spring-cloud-sleuth-core/pom.xml index af72b90f3..dc493d39c 100644 --- a/spring-cloud-sleuth-core/pom.xml +++ b/spring-cloud-sleuth-core/pom.xml @@ -31,7 +31,7 @@ org.springframework.cloud spring-cloud-sleuth - 2.2.2.BUILD-SNAPSHOT + 2.2.3.BUILD-SNAPSHOT .. diff --git a/spring-cloud-sleuth-dependencies/pom.xml b/spring-cloud-sleuth-dependencies/pom.xml index f71dfc761..b99c3ba6b 100644 --- a/spring-cloud-sleuth-dependencies/pom.xml +++ b/spring-cloud-sleuth-dependencies/pom.xml @@ -22,11 +22,11 @@ spring-cloud-dependencies-parent org.springframework.cloud - 2.2.1.RELEASE + 2.2.4.BUILD-SNAPSHOT spring-cloud-sleuth-dependencies - 2.2.2.BUILD-SNAPSHOT + 2.2.3.BUILD-SNAPSHOT pom spring-cloud-sleuth-dependencies Spring Cloud Sleuth Dependencies diff --git a/spring-cloud-sleuth-samples/pom.xml b/spring-cloud-sleuth-samples/pom.xml index 0390daa62..08d7d286b 100644 --- a/spring-cloud-sleuth-samples/pom.xml +++ b/spring-cloud-sleuth-samples/pom.xml @@ -28,7 +28,7 @@ org.springframework.cloud spring-cloud-sleuth - 2.2.2.BUILD-SNAPSHOT + 2.2.3.BUILD-SNAPSHOT .. diff --git a/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-feign/pom.xml b/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-feign/pom.xml index f9b6f6a2a..b009b44ff 100644 --- a/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-feign/pom.xml +++ b/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-feign/pom.xml @@ -28,7 +28,7 @@ org.springframework.cloud spring-cloud-sleuth-samples - 2.2.2.BUILD-SNAPSHOT + 2.2.3.BUILD-SNAPSHOT .. diff --git a/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-messaging/pom.xml b/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-messaging/pom.xml index 6a83d881c..d4f778033 100644 --- a/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-messaging/pom.xml +++ b/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-messaging/pom.xml @@ -28,7 +28,7 @@ org.springframework.cloud spring-cloud-sleuth-samples - 2.2.2.BUILD-SNAPSHOT + 2.2.3.BUILD-SNAPSHOT .. diff --git a/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-ribbon/pom.xml b/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-ribbon/pom.xml index 428307d5f..a1c3e6d3f 100644 --- a/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-ribbon/pom.xml +++ b/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-ribbon/pom.xml @@ -28,7 +28,7 @@ org.springframework.cloud spring-cloud-sleuth-samples - 2.2.2.BUILD-SNAPSHOT + 2.2.3.BUILD-SNAPSHOT .. diff --git a/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-test-core/pom.xml b/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-test-core/pom.xml index 9469ac2c4..84723e1de 100644 --- a/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-test-core/pom.xml +++ b/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-test-core/pom.xml @@ -28,7 +28,7 @@ org.springframework.cloud spring-cloud-sleuth-samples - 2.2.2.BUILD-SNAPSHOT + 2.2.3.BUILD-SNAPSHOT .. diff --git a/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-websocket/pom.xml b/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-websocket/pom.xml index d4f15e8ae..32ef5b27a 100644 --- a/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-websocket/pom.xml +++ b/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-websocket/pom.xml @@ -28,7 +28,7 @@ org.springframework.cloud spring-cloud-sleuth-samples - 2.2.2.BUILD-SNAPSHOT + 2.2.3.BUILD-SNAPSHOT .. diff --git a/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-zipkin/pom.xml b/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-zipkin/pom.xml index a71e7e406..07d38b06e 100644 --- a/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-zipkin/pom.xml +++ b/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-zipkin/pom.xml @@ -28,7 +28,7 @@ org.springframework.cloud spring-cloud-sleuth-samples - 2.2.2.BUILD-SNAPSHOT + 2.2.3.BUILD-SNAPSHOT .. diff --git a/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample/pom.xml b/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample/pom.xml index 0867149df..bbf12e31f 100644 --- a/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample/pom.xml +++ b/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample/pom.xml @@ -28,7 +28,7 @@ org.springframework.cloud spring-cloud-sleuth-samples - 2.2.2.BUILD-SNAPSHOT + 2.2.3.BUILD-SNAPSHOT .. diff --git a/spring-cloud-sleuth-zipkin/pom.xml b/spring-cloud-sleuth-zipkin/pom.xml index 5412d198f..0843e555e 100644 --- a/spring-cloud-sleuth-zipkin/pom.xml +++ b/spring-cloud-sleuth-zipkin/pom.xml @@ -28,7 +28,7 @@ org.springframework.cloud spring-cloud-sleuth - 2.2.2.BUILD-SNAPSHOT + 2.2.3.BUILD-SNAPSHOT .. diff --git a/spring-cloud-starter-sleuth/pom.xml b/spring-cloud-starter-sleuth/pom.xml index a19c15fd5..14be51451 100644 --- a/spring-cloud-starter-sleuth/pom.xml +++ b/spring-cloud-starter-sleuth/pom.xml @@ -22,7 +22,7 @@ org.springframework.cloud spring-cloud-sleuth - 2.2.2.BUILD-SNAPSHOT + 2.2.3.BUILD-SNAPSHOT .. spring-cloud-starter-sleuth diff --git a/spring-cloud-starter-zipkin/pom.xml b/spring-cloud-starter-zipkin/pom.xml index 22f67d6c4..59b5cc7bb 100644 --- a/spring-cloud-starter-zipkin/pom.xml +++ b/spring-cloud-starter-zipkin/pom.xml @@ -22,7 +22,7 @@ org.springframework.cloud spring-cloud-sleuth - 2.2.2.BUILD-SNAPSHOT + 2.2.3.BUILD-SNAPSHOT .. spring-cloud-starter-zipkin diff --git a/tests/pom.xml b/tests/pom.xml index d08eba732..2296c651b 100644 --- a/tests/pom.xml +++ b/tests/pom.xml @@ -30,7 +30,7 @@ org.springframework.cloud spring-cloud-sleuth - 2.2.2.BUILD-SNAPSHOT + 2.2.3.BUILD-SNAPSHOT .. diff --git a/tests/spring-cloud-sleuth-instrumentation-async-tests/pom.xml b/tests/spring-cloud-sleuth-instrumentation-async-tests/pom.xml index 83b5c30cb..947798f7f 100644 --- a/tests/spring-cloud-sleuth-instrumentation-async-tests/pom.xml +++ b/tests/spring-cloud-sleuth-instrumentation-async-tests/pom.xml @@ -30,7 +30,7 @@ org.springframework.cloud spring-cloud-sleuth-tests - 2.2.2.BUILD-SNAPSHOT + 2.2.3.BUILD-SNAPSHOT .. diff --git a/tests/spring-cloud-sleuth-instrumentation-feign-tests/pom.xml b/tests/spring-cloud-sleuth-instrumentation-feign-tests/pom.xml index 17cf6232b..0ac91933e 100644 --- a/tests/spring-cloud-sleuth-instrumentation-feign-tests/pom.xml +++ b/tests/spring-cloud-sleuth-instrumentation-feign-tests/pom.xml @@ -30,7 +30,7 @@ org.springframework.cloud spring-cloud-sleuth-tests - 2.2.2.BUILD-SNAPSHOT + 2.2.3.BUILD-SNAPSHOT .. diff --git a/tests/spring-cloud-sleuth-instrumentation-grpc-tests/pom.xml b/tests/spring-cloud-sleuth-instrumentation-grpc-tests/pom.xml index df04dc0fb..67f3c15a0 100644 --- a/tests/spring-cloud-sleuth-instrumentation-grpc-tests/pom.xml +++ b/tests/spring-cloud-sleuth-instrumentation-grpc-tests/pom.xml @@ -30,7 +30,7 @@ org.springframework.cloud spring-cloud-sleuth-tests - 2.2.2.BUILD-SNAPSHOT + 2.2.3.BUILD-SNAPSHOT .. diff --git a/tests/spring-cloud-sleuth-instrumentation-hystrix-tests/pom.xml b/tests/spring-cloud-sleuth-instrumentation-hystrix-tests/pom.xml index a6d6c31da..f4ccaa68d 100644 --- a/tests/spring-cloud-sleuth-instrumentation-hystrix-tests/pom.xml +++ b/tests/spring-cloud-sleuth-instrumentation-hystrix-tests/pom.xml @@ -30,7 +30,7 @@ org.springframework.cloud spring-cloud-sleuth-tests - 2.2.2.BUILD-SNAPSHOT + 2.2.3.BUILD-SNAPSHOT .. diff --git a/tests/spring-cloud-sleuth-instrumentation-lettuce-tests/pom.xml b/tests/spring-cloud-sleuth-instrumentation-lettuce-tests/pom.xml index 0efc8054a..84c9cd677 100644 --- a/tests/spring-cloud-sleuth-instrumentation-lettuce-tests/pom.xml +++ b/tests/spring-cloud-sleuth-instrumentation-lettuce-tests/pom.xml @@ -30,7 +30,7 @@ org.springframework.cloud spring-cloud-sleuth-tests - 2.2.2.BUILD-SNAPSHOT + 2.2.3.BUILD-SNAPSHOT .. diff --git a/tests/spring-cloud-sleuth-instrumentation-messaging-tests/pom.xml b/tests/spring-cloud-sleuth-instrumentation-messaging-tests/pom.xml index 9133fe704..e7e9415fb 100644 --- a/tests/spring-cloud-sleuth-instrumentation-messaging-tests/pom.xml +++ b/tests/spring-cloud-sleuth-instrumentation-messaging-tests/pom.xml @@ -31,7 +31,7 @@ https://www.w3.org/2001/XMLSchema-instance "> org.springframework.cloud spring-cloud-sleuth-tests - 2.2.2.BUILD-SNAPSHOT + 2.2.3.BUILD-SNAPSHOT .. diff --git a/tests/spring-cloud-sleuth-instrumentation-mvc-tests/pom.xml b/tests/spring-cloud-sleuth-instrumentation-mvc-tests/pom.xml index 8e2163a5d..0f4467c3c 100644 --- a/tests/spring-cloud-sleuth-instrumentation-mvc-tests/pom.xml +++ b/tests/spring-cloud-sleuth-instrumentation-mvc-tests/pom.xml @@ -30,7 +30,7 @@ org.springframework.cloud spring-cloud-sleuth-tests - 2.2.2.BUILD-SNAPSHOT + 2.2.3.BUILD-SNAPSHOT .. diff --git a/tests/spring-cloud-sleuth-instrumentation-reactor-tests/pom.xml b/tests/spring-cloud-sleuth-instrumentation-reactor-tests/pom.xml index 85fd25178..224c93efc 100644 --- a/tests/spring-cloud-sleuth-instrumentation-reactor-tests/pom.xml +++ b/tests/spring-cloud-sleuth-instrumentation-reactor-tests/pom.xml @@ -30,7 +30,7 @@ org.springframework.cloud spring-cloud-sleuth-tests - 2.2.2.BUILD-SNAPSHOT + 2.2.3.BUILD-SNAPSHOT .. diff --git a/tests/spring-cloud-sleuth-instrumentation-rpc-tests/pom.xml b/tests/spring-cloud-sleuth-instrumentation-rpc-tests/pom.xml index 60c648ac3..4fd0d5813 100644 --- a/tests/spring-cloud-sleuth-instrumentation-rpc-tests/pom.xml +++ b/tests/spring-cloud-sleuth-instrumentation-rpc-tests/pom.xml @@ -30,7 +30,7 @@ org.springframework.cloud spring-cloud-sleuth-tests - 2.2.2.BUILD-SNAPSHOT + 2.2.3.BUILD-SNAPSHOT .. diff --git a/tests/spring-cloud-sleuth-instrumentation-rxjava-tests/pom.xml b/tests/spring-cloud-sleuth-instrumentation-rxjava-tests/pom.xml index 1835a004a..b9469c333 100644 --- a/tests/spring-cloud-sleuth-instrumentation-rxjava-tests/pom.xml +++ b/tests/spring-cloud-sleuth-instrumentation-rxjava-tests/pom.xml @@ -30,7 +30,7 @@ org.springframework.cloud spring-cloud-sleuth-tests - 2.2.2.BUILD-SNAPSHOT + 2.2.3.BUILD-SNAPSHOT .. diff --git a/tests/spring-cloud-sleuth-instrumentation-scheduling-tests/pom.xml b/tests/spring-cloud-sleuth-instrumentation-scheduling-tests/pom.xml index edb74b25f..bf0bea754 100644 --- a/tests/spring-cloud-sleuth-instrumentation-scheduling-tests/pom.xml +++ b/tests/spring-cloud-sleuth-instrumentation-scheduling-tests/pom.xml @@ -30,7 +30,7 @@ org.springframework.cloud spring-cloud-sleuth-tests - 2.2.2.BUILD-SNAPSHOT + 2.2.3.BUILD-SNAPSHOT .. diff --git a/tests/spring-cloud-sleuth-instrumentation-webflux-tests/pom.xml b/tests/spring-cloud-sleuth-instrumentation-webflux-tests/pom.xml index 2d4c79a35..d5c1d543b 100644 --- a/tests/spring-cloud-sleuth-instrumentation-webflux-tests/pom.xml +++ b/tests/spring-cloud-sleuth-instrumentation-webflux-tests/pom.xml @@ -30,7 +30,7 @@ org.springframework.cloud spring-cloud-sleuth-tests - 2.2.2.BUILD-SNAPSHOT + 2.2.3.BUILD-SNAPSHOT .. diff --git a/tests/spring-cloud-sleuth-instrumentation-zuul-tests/pom.xml b/tests/spring-cloud-sleuth-instrumentation-zuul-tests/pom.xml index 192aff8d3..b312dc991 100644 --- a/tests/spring-cloud-sleuth-instrumentation-zuul-tests/pom.xml +++ b/tests/spring-cloud-sleuth-instrumentation-zuul-tests/pom.xml @@ -30,7 +30,7 @@ org.springframework.cloud spring-cloud-sleuth-tests - 2.2.2.BUILD-SNAPSHOT + 2.2.3.BUILD-SNAPSHOT .. From 42add19daaba2e4e6588178dcb7ae16316068c77 Mon Sep 17 00:00:00 2001 From: Adrian Cole Date: Thu, 5 Mar 2020 12:30:01 +0800 Subject: [PATCH 4/4] Adds base integration test for reactor clients and adds cancelation tests (#1578) --- .../client/HttpClientBeanPostProcessor.java | 87 +++++----- .../TraceWebClientBeanPostProcessor.java | 130 ++++++++------ .../TraceWebClientBeanPostProcessorTest.java | 41 +++++ .../client/integration/WebClientTests.java | 9 +- .../ITSpringConfiguredReactorClient.java | 161 ++++++++++++++++++ .../ReactorNettyHttpClientBraveTests.java | 64 ++----- .../client/TestHttpCallbackSubscriber.java | 18 +- .../web/client/WebClientBraveTests.java | 89 ++++------ 8 files changed, 380 insertions(+), 219 deletions(-) create mode 100644 tests/spring-cloud-sleuth-instrumentation-reactor-tests/src/test/java/org/springframework/cloud/sleuth/instrument/web/client/ITSpringConfiguredReactorClient.java diff --git a/spring-cloud-sleuth-core/src/main/java/org/springframework/cloud/sleuth/instrument/web/client/HttpClientBeanPostProcessor.java b/spring-cloud-sleuth-core/src/main/java/org/springframework/cloud/sleuth/instrument/web/client/HttpClientBeanPostProcessor.java index 45312ffa5..fc26b271b 100644 --- a/spring-cloud-sleuth-core/src/main/java/org/springframework/cloud/sleuth/instrument/web/client/HttpClientBeanPostProcessor.java +++ b/spring-cloud-sleuth-core/src/main/java/org/springframework/cloud/sleuth/instrument/web/client/HttpClientBeanPostProcessor.java @@ -17,14 +17,15 @@ package org.springframework.cloud.sleuth.instrument.web.client; import java.net.InetSocketAddress; +import java.util.concurrent.CancellationException; import java.util.concurrent.atomic.AtomicReference; import java.util.function.BiConsumer; import java.util.function.BiFunction; +import java.util.function.Supplier; import brave.Span; import brave.http.HttpClientHandler; import brave.http.HttpTracing; -import brave.propagation.CurrentTraceContext; import brave.propagation.TraceContext; import io.netty.bootstrap.Bootstrap; import reactor.core.publisher.Mono; @@ -63,48 +64,60 @@ class HttpClientBeanPostProcessor implements BeanPostProcessor { .doOnResponse(new TracingDoOnResponse(httpTracing)) .doOnRequestError(new TracingDoOnErrorRequest(httpTracing)) .doOnRequest(new TracingDoOnRequest(httpTracing)) - .mapConnect(new TracingMapConnect(httpTracing)); + .mapConnect(new TracingMapConnect(() -> { + HttpTracing ref = httpTracing.get(); + return ref != null ? ref.tracing().currentTraceContext().get() + : null; + })); } return bean; } - /** current client span, cleared on completion. */ - private static final class CurrentClientSpan extends AtomicReference { + /** The current client span, cleared on completion for any reason. */ + static final class PendingSpan extends AtomicReference { } - private static class TracingMapConnect implements + static class TracingMapConnect implements BiFunction, Bootstrap, Mono> { - final LazyBean httpTracing; + static final Exception CANCELLED_ERROR = new CancellationException("CANCELLED") { + @Override + public Throwable fillInStackTrace() { + return this; // stack trace doesn't add value here + } + }; - CurrentTraceContext currentTraceContext; + final Supplier currentTraceContext; - TracingMapConnect(LazyBean httpTracing) { - this.httpTracing = httpTracing; + TracingMapConnect(Supplier currentTraceContext) { + this.currentTraceContext = currentTraceContext; } @Override public Mono apply(Mono mono, Bootstrap bootstrap) { + // This function is invoked once per-request. We keep a reference to the + // pending client span here, so that only one signal completes the span. + PendingSpan pendingSpan = new PendingSpan(); return mono.subscriberContext(context -> { - TraceContext invocationContext = currentTraceContext().get(); + TraceContext invocationContext = currentTraceContext.get(); if (invocationContext != null) { // Read in this processor and also in ScopePassingSpanSubscriber context = context.put(TraceContext.class, invocationContext); } - return context.put(CurrentClientSpan.class, new CurrentClientSpan()); + return context.put(PendingSpan.class, pendingSpan); + }).doOnCancel(() -> { + // Check to see if Subscription.cancel() happened before another signal, + // like onComplete() completed the span (clearing the reference). + Span span = pendingSpan.getAndSet(null); + if (span != null) { + span.error(CANCELLED_ERROR); + span.finish(); + } }); } - CurrentTraceContext currentTraceContext() { - if (this.currentTraceContext == null) { - this.currentTraceContext = this.httpTracing.get().tracing() - .currentTraceContext(); - } - return this.currentTraceContext; - } - } private static class TracingDoOnRequest @@ -125,28 +138,24 @@ class HttpClientBeanPostProcessor implements BeanPostProcessor { return this.handler; } - CurrentTraceContext currentTraceContext() { - return httpTracing.get().tracing().currentTraceContext(); - } - @Override public void accept(HttpClientRequest req, Connection connection) { - CurrentClientSpan ref = req.currentContext() - .getOrDefault(CurrentClientSpan.class, null); - if (ref == null) { // Somehow TracingMapConnect was not invoked.. skip out - return; + PendingSpan pendingSpan = req.currentContext().getOrDefault(PendingSpan.class, + null); + if (pendingSpan == null) { + return; // Somehow TracingMapConnect was not invoked.. skip out } // This might be re-entrant on auto-redirect or connection retry: // See reactor/reactor-netty#1000 for follow-ups. - Span clientSpan = ref.getAndSet(null); - if (clientSpan != null) { + Span span = pendingSpan.getAndSet(null); + if (span != null) { // Retry from a connect fail wouldn't have parsed the request, leading to // an empty span with no data if we finished it. An auto-redirect would // have parsed the request, but we have no idea which status code it // finished with. Since we can't see the preceding request state, we // abandon its span in favor of the next. - clientSpan.abandon(); + span.abandon(); } // Start a new client span with the appropriate parent @@ -154,9 +163,9 @@ class HttpClientBeanPostProcessor implements BeanPostProcessor { null); HttpClientRequestWrapper request = new HttpClientRequestWrapper(req); - clientSpan = handler().handleSendWithParent(request, parent); - parseConnectionAddress(connection, clientSpan); - ref.set(clientSpan); + span = handler().handleSendWithParent(request, parent); + parseConnectionAddress(connection, span); + pendingSpan.set(span); } static void parseConnectionAddress(Connection connection, Span span) { @@ -231,18 +240,18 @@ class HttpClientBeanPostProcessor implements BeanPostProcessor { void handle(Context context, @Nullable HttpClientResponse resp, @Nullable Throwable error) { - CurrentClientSpan ref = context.getOrDefault(CurrentClientSpan.class, null); - if (ref == null) { // Somehow TracingMapConnect was not invoked.. skip out - return; + PendingSpan pendingSpan = context.getOrDefault(PendingSpan.class, null); + if (pendingSpan == null) { + return; // Somehow TracingMapConnect was not invoked.. skip out } - Span clientSpan = ref.getAndSet(null); - if (clientSpan == null) { + Span span = pendingSpan.getAndSet(null); + if (span == null) { return; // Unexpected. In the handle method, without a span to finish! } HttpClientResponseWrapper response = resp != null ? new HttpClientResponseWrapper(resp) : null; - handler().handleReceive(response, error, clientSpan); + handler().handleReceive(response, error, span); } } diff --git a/spring-cloud-sleuth-core/src/main/java/org/springframework/cloud/sleuth/instrument/web/client/TraceWebClientBeanPostProcessor.java b/spring-cloud-sleuth-core/src/main/java/org/springframework/cloud/sleuth/instrument/web/client/TraceWebClientBeanPostProcessor.java index 600c35fe5..924976843 100644 --- a/spring-cloud-sleuth-core/src/main/java/org/springframework/cloud/sleuth/instrument/web/client/TraceWebClientBeanPostProcessor.java +++ b/spring-cloud-sleuth-core/src/main/java/org/springframework/cloud/sleuth/instrument/web/client/TraceWebClientBeanPostProcessor.java @@ -18,6 +18,8 @@ package org.springframework.cloud.sleuth.instrument.web.client; import java.util.List; import java.util.concurrent.CancellationException; +import java.util.concurrent.atomic.AtomicBoolean; +import java.util.concurrent.atomic.AtomicReference; import java.util.function.Consumer; import java.util.function.Function; @@ -112,13 +114,6 @@ final class TraceExchangeFilterFunction implements ExchangeFilterFunction { private static final Log log = LogFactory.getLog(TraceExchangeFilterFunction.class); - static final Exception CANCELLED_ERROR = new CancellationException("CANCELLED") { - @Override - public Throwable fillInStackTrace() { - return this; // stack trace doesn't add value here - } - }; - final LazyBean httpTracing; final Function, ? extends Publisher> scopePassingTransformer; @@ -193,13 +188,16 @@ final class TraceExchangeFilterFunction implements ExchangeFilterFunction { log.debug("HttpClientHandler::handleSend: " + span); } + // NOTE: We are starting the client span for the request here, but it could be + // canceled prior to actually being invoked. TraceWebClientSubscription will + // abandon this span, if cancel() happens before request(). this.next.exchange(wrapper.buildRequest()).subscribe( - new WebClientTracerSubscriber(subscriber, context, span, this)); + new TraceWebClientSubscriber(subscriber, context, span, this)); } } - private static final class WebClientTracerSubscriber + static final class TraceWebClientSubscriber extends AtomicReference implements CoreSubscriber { final CoreSubscriber actual; @@ -209,61 +207,33 @@ final class TraceExchangeFilterFunction implements ExchangeFilterFunction { @Nullable final TraceContext parent; - final Span clientSpan; - final HttpClientHandler handler; final Function, ? extends Publisher> scopePassingTransformer; final CurrentTraceContext currentTraceContext; - // TODO: this isn't implemented correctly. error and success could both be called - boolean done; - - WebClientTracerSubscriber(CoreSubscriber actual, + TraceWebClientSubscriber(CoreSubscriber actual, Context ctx, Span clientSpan, MonoWebClientTrace mono) { this.actual = actual; this.parent = mono.parent; - this.clientSpan = clientSpan; this.handler = mono.handler; this.currentTraceContext = mono.currentTraceContext; this.scopePassingTransformer = mono.scopePassingTransformer; this.context = parent != null && !parent.equals(ctx.getOrDefault(TraceContext.class, null)) ? ctx.put(TraceContext.class, parent) : ctx; + set(clientSpan); } @Override public void onSubscribe(Subscription subscription) { - this.actual.onSubscribe(new Subscription() { - @Override - public void request(long n) { - try (Scope scope = currentTraceContext.maybeScope(parent)) { - subscription.request(n); - } - } - - @Override - public void cancel() { - try (Scope scope = currentTraceContext.maybeScope(parent)) { - subscription.cancel(); - } - finally { // TODO: this is probably incorrect as cancel happens - // routinely in unary subscription. - if (log.isDebugEnabled()) { - log.debug("Subscription was cancelled. Will close the span [" - + clientSpan + "]"); - } - handleReceive(null, CANCELLED_ERROR); - } - } - }); + this.actual.onSubscribe(new TraceWebClientSubscription(subscription, this)); } @Override public void onNext(ClientResponse response) { try (Scope scope = currentTraceContext.maybeScope(parent)) { - this.done = true; // decorate response body this.actual .onNext(ClientResponse.from(response) @@ -272,8 +242,12 @@ final class TraceExchangeFilterFunction implements ExchangeFilterFunction { .build()); } finally { - // TODO: is there a way to read the request at response time? - handleReceive(response, null); + Span span = getAndSet(null); + if (span != null) { + // TODO: is there a way to read the request at response time? + this.handler.handleReceive(new ClientResponseWrapper(response), null, + span); + } } } @@ -283,7 +257,11 @@ final class TraceExchangeFilterFunction implements ExchangeFilterFunction { this.actual.onError(t); } finally { - handleReceive(null, t); + Span span = getAndSet(null); + if (span != null) { + span.error(t); + span.finish(); + } } } @@ -293,13 +271,14 @@ final class TraceExchangeFilterFunction implements ExchangeFilterFunction { this.actual.onComplete(); } finally { - // TODO: onComplete should be after onNext. Why are we handling this? - if (!this.done) { // unknown state + Span span = getAndSet(null); + if (span != null) { + // TODO: backfill empty test: + // https://github.com/spring-cloud/spring-cloud-sleuth/issues/1570 if (log.isDebugEnabled()) { - log.debug("Reached OnComplete without finishing [" - + this.clientSpan + "]"); + log.debug("Reached OnComplete without finishing [" + span + "]"); } - this.clientSpan.abandon(); + span.abandon(); } } } @@ -309,10 +288,57 @@ final class TraceExchangeFilterFunction implements ExchangeFilterFunction { return this.context; } - void handleReceive(@Nullable ClientResponse res, @Nullable Throwable error) { - ClientResponseWrapper response = res != null ? new ClientResponseWrapper(res) - : null; - this.handler.handleReceive(response, error, clientSpan); + } + + static class TraceWebClientSubscription extends AtomicBoolean + implements Subscription { + + static final Exception CANCELLED_ERROR = new CancellationException("CANCELLED") { + @Override + public Throwable fillInStackTrace() { + return this; // stack trace doesn't add value here + } + }; + + final AtomicReference pendingSpan; + + final Subscription delegate; + + TraceWebClientSubscription(Subscription delegate, + AtomicReference pendingSpan) { + this.delegate = delegate; + this.pendingSpan = pendingSpan; + } + + @Override + public void request(long n) { + if (compareAndSet(false, true)) { + delegate.request(n); // Not scoping to save overhead + } + } + + @Override + public void cancel() { + delegate.cancel(); // Not scoping to save overhead + + // Check to see if Subscription.cancel() happened after request(), + // but before another signal (like onComplete) completed the span. + Span span = pendingSpan.getAndSet(null); + if (span != null) { + if (log.isDebugEnabled()) { + log.debug( + "Subscription was cancelled. TraceWebClientBeanPostProcessor Will close the span [" + + span + "]"); + } + + if (!get()) { // Subscription.request() not called: Abandon the span. + span.abandon(); + } + else { // Request was canceled in-flight + span.error(CANCELLED_ERROR); + span.finish(); + } + } } } diff --git a/spring-cloud-sleuth-core/src/test/java/org/springframework/cloud/sleuth/instrument/web/client/TraceWebClientBeanPostProcessorTest.java b/spring-cloud-sleuth-core/src/test/java/org/springframework/cloud/sleuth/instrument/web/client/TraceWebClientBeanPostProcessorTest.java index 4bf00805c..2f67fbad8 100644 --- a/spring-cloud-sleuth-core/src/test/java/org/springframework/cloud/sleuth/instrument/web/client/TraceWebClientBeanPostProcessorTest.java +++ b/spring-cloud-sleuth-core/src/test/java/org/springframework/cloud/sleuth/instrument/web/client/TraceWebClientBeanPostProcessorTest.java @@ -16,15 +16,23 @@ package org.springframework.cloud.sleuth.instrument.web.client; +import java.util.concurrent.atomic.AtomicReference; + +import brave.Span; import org.assertj.core.api.BDDAssertions; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; import org.mockito.junit.MockitoJUnitRunner; +import org.reactivestreams.Subscription; +import org.springframework.cloud.sleuth.instrument.web.client.TraceExchangeFilterFunction.TraceWebClientSubscription; import org.springframework.context.ConfigurableApplicationContext; import org.springframework.web.reactive.function.client.WebClient; +import static org.assertj.core.api.Assertions.assertThat; +import static org.mockito.Mockito.verify; + /** * @author Marcin Grzejszczak */ @@ -34,6 +42,12 @@ public class TraceWebClientBeanPostProcessorTest { @Mock ConfigurableApplicationContext springContext; + @Mock + Subscription subscription; + + @Mock + Span span; + @Test public void should_add_filter_only_once_to_web_client() { TraceWebClientBeanPostProcessor processor = new TraceWebClientBeanPostProcessor( @@ -68,4 +82,31 @@ public class TraceWebClientBeanPostProcessorTest { }); } + @Test + public void should_close_span_on_cancel() { + TraceWebClientSubscription traceSubscription = new TraceWebClientSubscription( + subscription, new AtomicReference<>(span)); + + traceSubscription.request(1); + traceSubscription.cancel(); + + verify(span).error(TraceWebClientSubscription.CANCELLED_ERROR); + verify(span).finish(); + + // Check that the ref is clear following span completion + assertThat(traceSubscription.pendingSpan.get()).isNull(); + } + + @Test + public void should_not_crash_on_cancel_when_span_clear() { + TraceWebClientSubscription traceSubscription = new TraceWebClientSubscription( + subscription, new AtomicReference<>()); + + traceSubscription.request(1); + traceSubscription.cancel(); + + verify(subscription).request(1); + verify(subscription).cancel(); + } + } diff --git a/spring-cloud-sleuth-core/src/test/java/org/springframework/cloud/sleuth/instrument/web/client/integration/WebClientTests.java b/spring-cloud-sleuth-core/src/test/java/org/springframework/cloud/sleuth/instrument/web/client/integration/WebClientTests.java index 3c47698aa..e7aa4c95a 100644 --- a/spring-cloud-sleuth-core/src/test/java/org/springframework/cloud/sleuth/instrument/web/client/integration/WebClientTests.java +++ b/spring-cloud-sleuth-core/src/test/java/org/springframework/cloud/sleuth/instrument/web/client/integration/WebClientTests.java @@ -372,8 +372,12 @@ public class WebClientTests { .contains("CLIENT"); } + /** + * Cancel before {@link Subscription#request(long)} means a network request was never + * sent + */ @Test - public void shouldTagOnCancel() { + public void shouldNotTagOnCancel() { this.webClient.get().uri("http://localhost:" + this.port + "/doNotSkip") .retrieve().bodyToMono(String.class) .subscribe(new BaseSubscriber() { @@ -383,8 +387,7 @@ public class WebClientTests { } }); - then(this.reporter.getSpans()).isNotEmpty(); - then(this.reporter.getSpans().get(0).tags()).containsEntry("error", "CANCELLED"); + then(this.reporter.getSpans()).isEmpty(); } @Test diff --git a/tests/spring-cloud-sleuth-instrumentation-reactor-tests/src/test/java/org/springframework/cloud/sleuth/instrument/web/client/ITSpringConfiguredReactorClient.java b/tests/spring-cloud-sleuth-instrumentation-reactor-tests/src/test/java/org/springframework/cloud/sleuth/instrument/web/client/ITSpringConfiguredReactorClient.java new file mode 100644 index 000000000..5ac284c46 --- /dev/null +++ b/tests/spring-cloud-sleuth-instrumentation-reactor-tests/src/test/java/org/springframework/cloud/sleuth/instrument/web/client/ITSpringConfiguredReactorClient.java @@ -0,0 +1,161 @@ +/* + * Copyright 2013-2019 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.web.client; + +import java.net.URI; +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.TimeUnit; + +import brave.http.HttpTracing; +import brave.test.http.ITHttpAsyncClient; +import io.netty.channel.ChannelOption; +import io.netty.handler.timeout.ReadTimeoutHandler; +import okhttp3.mockwebserver.Dispatcher; +import okhttp3.mockwebserver.MockResponse; +import okhttp3.mockwebserver.RecordedRequest; +import org.junit.Test; +import org.reactivestreams.Subscription; +import reactor.core.publisher.BaseSubscriber; +import reactor.core.publisher.Mono; +import reactor.netty.http.client.HttpClient; +import zipkin2.Callback; + +import org.springframework.context.annotation.AnnotationConfigApplicationContext; + +import static org.assertj.core.api.Assertions.assertThat; + +/** + * This runs Brave's integration tests, ensuring common instrumentation bugs aren't + * present. + */ +// Function of spring context so that shutdown hooks happen! +abstract class ITSpringConfiguredReactorClient + extends ITHttpAsyncClient { + + final Class[] componentClasses; + + /** + * @param componentClasses configure instrumentation given {@linkplain URI baseUrl}, + * {@link HttpClient} and {@link HttpTracing} bindings exist. + */ + ITSpringConfiguredReactorClient(Class... componentClasses) { + this.componentClasses = componentClasses; + } + + @Override + final protected AnnotationConfigApplicationContext newClient(int port) { + AnnotationConfigApplicationContext result = new AnnotationConfigApplicationContext(); + URI baseUrl = URI.create("http://127.0.0.1:" + server.getPort()); + result.registerBean(HttpTracing.class, () -> httpTracing); + result.registerBean(HttpClient.class, () -> testHttpClient(baseUrl)); + result.registerBean(URI.class, () -> baseUrl); + result.register(componentClasses); + result.refresh(); + return result; + } + + static HttpClient testHttpClient(URI baseUrl) { + return HttpClient.create().baseUrl(baseUrl.toString()) + .tcpConfiguration(tcpClient -> tcpClient + .option(ChannelOption.CONNECT_TIMEOUT_MILLIS, 1000) + .doOnConnected(conn -> conn + .addHandler(new ReadTimeoutHandler(1, TimeUnit.SECONDS)))) + .followRedirect(true); + } + + @Override + final protected void closeClient(AnnotationConfigApplicationContext context) { + context.close(); // ensures shutdown hooks fire + } + + @Override + final protected void get(AnnotationConfigApplicationContext context, + String pathIncludingQuery) { + getMono(context, pathIncludingQuery).block(); + } + + @Override + final protected void post(AnnotationConfigApplicationContext context, + String pathIncludingQuery, String body) { + postMono(context, pathIncludingQuery, body).block(); + } + + @Override + final protected void getAsync(AnnotationConfigApplicationContext context, String path, + Callback callback) { + TestHttpCallbackSubscriber.subscribe(getMono(context, path), callback); + } + + /** Returns a {@link Mono} of the HTTP status code from the given "POST" request. */ + abstract Mono postMono(AnnotationConfigApplicationContext context, + String pathIncludingQuery, String body); + + /** Returns a {@link Mono} of the HTTP status code. */ + abstract Mono getMono(AnnotationConfigApplicationContext context, + String pathIncludingQuery); + + /** + * This assumes that implementations do not issue an HTTP request until + * {@link Subscription#request(long)} is called. Since a client span is only for + * remote operations, we should not create one when we know a network request won't + * happen. In this case, we ensure a canceled subscription doesn't end up traced. + */ + @Test + public void cancelledSubscription_doesntTrace() throws Exception { + CountDownLatch latch = new CountDownLatch(1); + + BaseSubscriber subscriber = new BaseSubscriber() { + @Override + protected void hookOnSubscribe(Subscription subscription) { + subscription.cancel(); + latch.countDown(); + } + }; + + getMono(client, "/foo").subscribe(subscriber); + + latch.await(); + + assertThat(server.getRequestCount()).isZero(); + // post-conditions will prove no span was created + } + + @Test + public void cancelInFlight() throws Exception { + BaseSubscriber subscriber = new BaseSubscriber() { + }; + + CountDownLatch latch = new CountDownLatch(1); + + server.setDispatcher(new Dispatcher() { + @Override + public MockResponse dispatch(RecordedRequest request) { + subscriber.cancel(); + latch.countDown(); + return new MockResponse(); + } + }); + + getMono(client, "/foo").subscribe(subscriber); + + latch.await(); + + assertThat(server.getRequestCount()).isOne(); + assertThat(takeSpan().tags()).containsKey("error"); + } + +} diff --git a/tests/spring-cloud-sleuth-instrumentation-reactor-tests/src/test/java/org/springframework/cloud/sleuth/instrument/web/client/ReactorNettyHttpClientBraveTests.java b/tests/spring-cloud-sleuth-instrumentation-reactor-tests/src/test/java/org/springframework/cloud/sleuth/instrument/web/client/ReactorNettyHttpClientBraveTests.java index af2d8ded7..b52d80fe7 100644 --- a/tests/spring-cloud-sleuth-instrumentation-reactor-tests/src/test/java/org/springframework/cloud/sleuth/instrument/web/client/ReactorNettyHttpClientBraveTests.java +++ b/tests/spring-cloud-sleuth-instrumentation-reactor-tests/src/test/java/org/springframework/cloud/sleuth/instrument/web/client/ReactorNettyHttpClientBraveTests.java @@ -16,65 +16,23 @@ package org.springframework.cloud.sleuth.instrument.web.client; -import java.util.concurrent.TimeUnit; - -import brave.http.HttpTracing; -import brave.test.http.ITHttpAsyncClient; -import io.netty.channel.ChannelOption; -import io.netty.handler.timeout.ReadTimeoutHandler; import org.junit.Ignore; import org.junit.Test; import reactor.core.publisher.Mono; import reactor.netty.ByteBufFlux; import reactor.netty.http.client.HttpClient; -import reactor.netty.http.client.HttpClientResponse; -import zipkin2.Callback; import org.springframework.beans.factory.config.BeanPostProcessor; import org.springframework.context.annotation.AnnotationConfigApplicationContext; -/** - * This runs Brave's integration tests, ensuring common instrumentation bugs aren't - * present. - */ -// Function of spring context so that shutdown hooks happen! -public class ReactorNettyHttpClientBraveTests - extends ITHttpAsyncClient { +public class ReactorNettyHttpClientBraveTests extends ITSpringConfiguredReactorClient { /** * This uses Spring to instrument the {@link HttpClient} using a * {@link BeanPostProcessor}. */ - @Override - protected AnnotationConfigApplicationContext newClient(int port) { - AnnotationConfigApplicationContext result = new AnnotationConfigApplicationContext(); - result.registerBean(HttpTracing.class, () -> httpTracing); - result.registerBean(HttpClient.class, - () -> testHttpClient().baseUrl("http://127.0.0.1:" + port)); - result.register(HttpClientBeanPostProcessor.class); - result.refresh(); - return result; - } - - static HttpClient testHttpClient() { - return HttpClient.create() - .tcpConfiguration(tcpClient -> tcpClient - .option(ChannelOption.CONNECT_TIMEOUT_MILLIS, 1000) - .doOnConnected(conn -> conn - .addHandler(new ReadTimeoutHandler(1, TimeUnit.SECONDS)))) - .followRedirect(true); - } - - @Override - protected void closeClient(AnnotationConfigApplicationContext context) { - context.close(); // ensures shutdown hooks fire - } - - @Override - protected void get(AnnotationConfigApplicationContext context, - String pathIncludingQuery) { - context.getBean(HttpClient.class).get().uri(pathIncludingQuery).response() - .block(); + public ReactorNettyHttpClientBraveTests() { + super(HttpClientBeanPostProcessor.class); } @Test @@ -127,20 +85,18 @@ public class ReactorNettyHttpClientBraveTests } @Override - protected void post(AnnotationConfigApplicationContext context, + Mono postMono(AnnotationConfigApplicationContext context, String pathIncludingQuery, String body) { - context.getBean(HttpClient.class).post() + return context.getBean(HttpClient.class).post() .send(ByteBufFlux.fromString(Mono.just(body))).uri(pathIncludingQuery) - .response().block(); + .response().map(r -> r.status().code()); } @Override - protected void getAsync(AnnotationConfigApplicationContext context, String path, - Callback callback) { - Mono request = context.getBean(HttpClient.class).get() - .uri(path).response(); - - TestHttpCallbackSubscriber.subscribe(request, r -> r.status().code(), callback); + Mono getMono(AnnotationConfigApplicationContext context, + String pathIncludingQuery) { + return context.getBean(HttpClient.class).get().uri(pathIncludingQuery).response() + .map(r -> r.status().code()); } } diff --git a/tests/spring-cloud-sleuth-instrumentation-reactor-tests/src/test/java/org/springframework/cloud/sleuth/instrument/web/client/TestHttpCallbackSubscriber.java b/tests/spring-cloud-sleuth-instrumentation-reactor-tests/src/test/java/org/springframework/cloud/sleuth/instrument/web/client/TestHttpCallbackSubscriber.java index b56557f03..196533dc6 100644 --- a/tests/spring-cloud-sleuth-instrumentation-reactor-tests/src/test/java/org/springframework/cloud/sleuth/instrument/web/client/TestHttpCallbackSubscriber.java +++ b/tests/spring-cloud-sleuth-instrumentation-reactor-tests/src/test/java/org/springframework/cloud/sleuth/instrument/web/client/TestHttpCallbackSubscriber.java @@ -17,7 +17,6 @@ package org.springframework.cloud.sleuth.instrument.web.client; import java.util.concurrent.atomic.AtomicReference; -import java.util.function.Function; import org.reactivestreams.Subscription; import reactor.core.CoreSubscriber; @@ -35,22 +34,17 @@ import zipkin2.Callback; * The implementation forwards signals to the supplied {@link Callback}, enforcing * assumptions about a non-empty, {@link Mono} subscription. */ -final class TestHttpCallbackSubscriber implements CoreSubscriber { +final class TestHttpCallbackSubscriber implements CoreSubscriber { - static void subscribe(Mono mono, Function statusCodeFunction, - Callback callback) { - mono.subscribe(new TestHttpCallbackSubscriber<>(statusCodeFunction, callback)); + static void subscribe(Mono mono, Callback callback) { + mono.subscribe(new TestHttpCallbackSubscriber(callback)); } - final Function statusCodeFunction; - final Callback callback; final AtomicReference ref = new AtomicReference<>(); - private TestHttpCallbackSubscriber(Function statusCodeFunction, - Callback callback) { - this.statusCodeFunction = statusCodeFunction; + private TestHttpCallbackSubscriber(Callback callback) { this.callback = callback; } @@ -67,9 +61,9 @@ final class TestHttpCallbackSubscriber implements CoreSubscriber { } @Override - public void onNext(T t) { + public void onNext(Integer t) { if (ref.getAndSet(null) != null) { - callback.onSuccess(statusCodeFunction.apply(t)); + callback.onSuccess(t); } else { // This is a Mono, which doesn't signal onNext() twice. If we reach here, diff --git a/tests/spring-cloud-sleuth-instrumentation-reactor-tests/src/test/java/org/springframework/cloud/sleuth/instrument/web/client/WebClientBraveTests.java b/tests/spring-cloud-sleuth-instrumentation-reactor-tests/src/test/java/org/springframework/cloud/sleuth/instrument/web/client/WebClientBraveTests.java index e2b6833ed..59c247885 100644 --- a/tests/spring-cloud-sleuth-instrumentation-reactor-tests/src/test/java/org/springframework/cloud/sleuth/instrument/web/client/WebClientBraveTests.java +++ b/tests/spring-cloud-sleuth-instrumentation-reactor-tests/src/test/java/org/springframework/cloud/sleuth/instrument/web/client/WebClientBraveTests.java @@ -16,71 +16,54 @@ package org.springframework.cloud.sleuth.instrument.web.client; -import brave.http.HttpTracing; -import brave.test.http.ITHttpAsyncClient; +import java.net.URI; + import org.junit.Ignore; import org.junit.Test; import reactor.core.publisher.Mono; import reactor.netty.http.client.HttpClient; -import zipkin2.Callback; import org.springframework.beans.factory.config.BeanPostProcessor; +import org.springframework.boot.autoconfigure.web.reactive.function.client.WebClientAutoConfiguration; +import org.springframework.boot.web.reactive.function.client.WebClientCustomizer; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -import org.springframework.http.client.reactive.ClientHttpConnector; +import org.springframework.core.annotation.Order; import org.springframework.http.client.reactive.ReactorClientHttpConnector; import org.springframework.web.reactive.function.BodyInserters; import org.springframework.web.reactive.function.client.ClientResponse; import org.springframework.web.reactive.function.client.WebClient; /** - * This runs Brave's integration tests without underlying instrumentation, which would - * happen when a 3rd party client like Jetty is in use. + * This runs Brave's integration tests without underlying instrumentation, which is + * default in Spring Boot due to static instantiation in + * {@link org.springframework.boot.autoconfigure.web.reactive.function.client.ClientHttpConnectorConfiguration}. */ -// Function of spring context so that shutdown hooks happen! -public class WebClientBraveTests - extends ITHttpAsyncClient { +public class WebClientBraveTests extends ITSpringConfiguredReactorClient { /** * This uses Spring to instrument the {@link WebClient} using a * {@link BeanPostProcessor}. */ - @Override - protected AnnotationConfigApplicationContext newClient(int port) { - AnnotationConfigApplicationContext result = new AnnotationConfigApplicationContext(); - result.registerBean(HttpTracing.class, () -> httpTracing); - result.register(WebClientBuilderConfiguration.class); - result.register(TraceWebClientBeanPostProcessor.class); - result.refresh(); - return result; + public WebClientBraveTests() { + super(WebClientConfiguration.class, WebClientAutoConfiguration.class, + TraceWebClientBeanPostProcessor.class); } @Override - protected void closeClient(AnnotationConfigApplicationContext context) { - context.close(); // ensures shutdown hooks fire - } - - @Override - protected void get(AnnotationConfigApplicationContext context, - String pathIncludingQuery) { - client(context).get().uri(pathIncludingQuery).exchange().block(); - } - - @Override - protected void post(AnnotationConfigApplicationContext context, + Mono postMono(AnnotationConfigApplicationContext context, String pathIncludingQuery, String body) { - client(context).post().uri(pathIncludingQuery).body(BodyInserters.fromValue(body)) - .exchange().block(); + return context.getBean(WebClient.Builder.class).build().post() + .uri(pathIncludingQuery).body(BodyInserters.fromValue(body)).exchange() + .map(ClientResponse::rawStatusCode); } @Override - protected void getAsync(AnnotationConfigApplicationContext context, String path, - Callback callback) { - Mono request = client(context).get().uri(path).exchange(); - - TestHttpCallbackSubscriber.subscribe(request, ClientResponse::rawStatusCode, - callback); + Mono getMono(AnnotationConfigApplicationContext context, + String pathIncludingQuery) { + return context.getBean(WebClient.Builder.class).build().get() + .uri(pathIncludingQuery).exchange().map(ClientResponse::rawStatusCode); } @Test @@ -101,31 +84,19 @@ public class WebClientBraveTests public void readsRequestAtResponseTime() { } - WebClient client(AnnotationConfigApplicationContext context) { - return context.getBean(WebClient.Builder.class) - .baseUrl("http://127.0.0.1:" + server.getPort()).build(); - } - - /** - * This fakes auto-configuration which wouldn't configure reactor's trace - * instrumentation. - */ @Configuration - static class WebClientBuilderConfiguration { + static class WebClientConfiguration { + /** + * Normally, the HTTP connector would be statically initialized. This ensures the + * {@link HttpClient} is configured for the mock endpoint. + */ @Bean - HttpClient httpClient() { - return ReactorNettyHttpClientBraveTests.testHttpClient(); - } - - @Bean - ClientHttpConnector clientHttpConnector(HttpClient httpClient) { - return new ReactorClientHttpConnector(httpClient); - } - - @Bean - WebClient.Builder webClientBuilder(ClientHttpConnector clientHttpConnector) { - return WebClient.builder().clientConnector(clientHttpConnector); + @Order(0) + public WebClientCustomizer clientConnectorCustomizer(HttpClient httpClient, + URI baseUrl) { + return (builder) -> builder.baseUrl(baseUrl.toString()) + .clientConnector(new ReactorClientHttpConnector(httpClient)); } }