diff --git a/README.adoc b/README.adoc index af443d190..561f12fcb 100644 --- a/README.adoc +++ b/README.adoc @@ -401,7 +401,7 @@ the Spring BOM ==== Sleuth with Zipkin via HTTP -If you want both Sleuth and Zipkin just add the `spring-cloud-starter-zipkin` dependency. +If you want both Sleuth and Zipkin just add the `spring-cloud-starter-zipkin2` dependency. [source,xml,indent=0,subs="verbatim,attributes",role="primary"] .Maven @@ -420,12 +420,12 @@ If you want both Sleuth and Zipkin just add the `spring-cloud-starter-zipkin` de <2> org.springframework.cloud - spring-cloud-starter-zipkin + spring-cloud-starter-zipkin2 ---- <1> In order not to pick versions by yourself it's much better if you add the dependency management via the Spring BOM -<2> Add the dependency to `spring-cloud-starter-zipkin` +<2> Add the dependency to `spring-cloud-starter-zipkin2` [source,groovy,indent=0,subs="verbatim,attributes",role="secondary"] .Gradle @@ -437,16 +437,22 @@ dependencyManagement { <1> } dependencies { <2> - compile "org.springframework.cloud:spring-cloud-starter-zipkin" + compile "org.springframework.cloud:spring-cloud-starter-zipkin2" } ---- <1> In order not to pick versions by yourself it's much better if you add the dependency management via the Spring BOM -<2> Add the dependency to `spring-cloud-starter-zipkin` +<2> Add the dependency to `spring-cloud-starter-zipkin2` -==== Sleuth with Zipkin via Spring Cloud Stream +==== Sleuth with Zipkin via RabbitMQ or Kafka -If you want both Sleuth and Zipkin just add the `spring-cloud-sleuth-stream` dependency. +If you want to use RabbitMQ or Kafka instead of http, add the `spring-rabbit` or `spring-kafka` +dependencies. The default destination name is `zipkin`. + +_Note: `spring-cloud-sleuth-stream` is deprecated and incompatible with these destinations_ + +If you want Sleuth over RabbitMQ add the `spring-cloud-sleuth-starter-zipkin2` and `spring-rabbit` +dependencies. [source,xml,indent=0,subs="verbatim,attributes",role="primary"] .Maven @@ -465,23 +471,17 @@ If you want both Sleuth and Zipkin just add the `spring-cloud-sleuth-stream` dep <2> org.springframework.cloud - spring-cloud-sleuth-stream + spring-cloud-sleuth-starter-zipkin2 <3> - org.springframework.cloud - spring-cloud-starter-sleuth - - - <4> - org.springframework.cloud - spring-cloud-stream-binder-rabbit + org.springframework.amqp + spring-rabbit ---- <1> In order not to pick versions by yourself it's much better if you add the dependency management via the Spring BOM -<2> Add the dependency to `spring-cloud-sleuth-stream` -<3> Add the dependency to `spring-cloud-starter-sleuth` - that way all dependant dependencies will be downloaded -<4> Add a binder (e.g. Rabbit binder) to tell Spring Cloud Stream what it should bind to +<2> Add the dependency to `spring-cloud-starter-sleuth-zipkin2` - that way all dependent dependencies will be downloaded +<3> To automatically configure rabbit, simply add the spring-rabbit dependency [source,groovy,indent=0,subs="verbatim,attributes",role="secondary"] .Gradle @@ -493,100 +493,14 @@ dependencyManagement { <1> } dependencies { - compile "org.springframework.cloud:spring-cloud-sleuth-stream" <2> - compile "org.springframework.cloud:spring-cloud-starter-sleuth" <3> - // Example for Rabbit binding - compile "org.springframework.cloud:spring-cloud-stream-binder-rabbit" <4> + compile "org.springframework.cloud:spring-cloud-starter-sleuth-zipkin2" <2> + compile "org.springframework.amqp:spring-rabbit" <3> } ---- <1> In order not to pick versions by yourself it's much better if you add the dependency management via the Spring BOM -<2> Add the dependency to `spring-cloud-sleuth-stream` -<3> Add the dependency to `spring-cloud-starter-sleuth` - that way all dependant dependencies will be downloaded -<4> Add a binder (e.g. Rabbit binder) to tell Spring Cloud Stream what it should bind to - -==== Spring Cloud Sleuth Stream Zipkin Collector - -If you want to start a Spring Cloud Sleuth Stream Zipkin collector just add the `spring-cloud-sleuth-zipkin-stream` -dependency - -[source,xml,indent=0,subs="verbatim,attributes",role="primary"] -.Maven ----- - <1> - - - org.springframework.cloud - spring-cloud-dependencies - ${release.train.version} - pom - import - - - - - <2> - org.springframework.cloud - spring-cloud-sleuth-zipkin-stream - - <3> - org.springframework.cloud - spring-cloud-starter-sleuth - - - <4> - org.springframework.cloud - spring-cloud-stream-binder-rabbit - ----- -<1> In order not to pick versions by yourself it's much better if you add the dependency management via -the Spring BOM -<2> Add the dependency to `spring-cloud-sleuth-zipkin-stream` -<3> Add the dependency to `spring-cloud-starter-sleuth` - that way all dependant dependencies will be downloaded -<4> Add a binder (e.g. Rabbit binder) to tell Spring Cloud Stream what it should bind to - -[source,groovy,indent=0,subs="verbatim,attributes",role="secondary"] -.Gradle ----- -dependencyManagement { <1> - imports { - mavenBom "org.springframework.cloud:spring-cloud-dependencies:${releaseTrainVersion}" - } -} - -dependencies { - compile "org.springframework.cloud:spring-cloud-sleuth-zipkin-stream" <2> - compile "org.springframework.cloud:spring-cloud-starter-sleuth" <3> - // Example for Rabbit binding - compile "org.springframework.cloud:spring-cloud-stream-binder-rabbit" <4> -} ----- -<1> In order not to pick versions by yourself it's much better if you add the dependency management via -the Spring BOM -<2> Add the dependency to `spring-cloud-sleuth-zipkin-stream` -<3> Add the dependency to `spring-cloud-starter-sleuth` - that way all dependant dependencies will be downloaded -<4> Add a binder (e.g. Rabbit binder) to tell Spring Cloud Stream what it should bind to - -and then just annotate your main class with `@EnableZipkinStreamServer` annotation: - -[source,java] ----- -package example; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.cloud.sleuth.zipkin.stream.EnableZipkinStreamServer; - -@SpringBootApplication -@EnableZipkinStreamServer -public class ZipkinStreamServerApplication { - - public static void main(String[] args) throws Exception { - SpringApplication.run(ZipkinStreamServerApplication.class, args); - } - -} ----- +<2> Add the dependency to `spring-cloud-starter-sleuth-zipkin2` - that way all dependent dependencies will be downloaded +<3> To automatically configure rabbit, simply add the spring-rabbit dependency == Additional resources @@ -639,15 +553,13 @@ a baggage element then it will be sent downstream either via HTTP or messaging t * Provides simple metrics of accepted / dropped spans. -* If `spring-cloud-sleuth-zipkin` then the app will generate and collect Zipkin-compatible traces. +* If `spring-cloud-sleuth-zipkin2` then the app will generate and collect Zipkin-compatible traces. By default it sends them via HTTP to a Zipkin server on localhost (port 9411). Configure the location of the service using `spring.zipkin.baseUrl`. + - If you depend on `spring-rabbit` or `spring-kafka` your app will send traces to a broker instead of http. + - Note: `spring-cloud-sleuth-stream` is deprecated and should no longer be used. -* If `spring-cloud-sleuth-stream` then the app will generate and collect traces via https://github.com/spring-cloud/spring-cloud-stream[Spring Cloud Stream]. -Your app automatically becomes a producer of tracer messages that are sent over your broker of choice -(e.g. RabbitMQ, Apache Kafka, Redis). - -IMPORTANT: If using Zipkin or Stream, configure the percentage of spans exported using `spring.sleuth.sampler.percentage` +IMPORTANT: If using Zipkin, configure the percentage of spans exported using `spring.sleuth.sampler.percentage` (default 0.1, i.e. 10%). *Otherwise you might think that Sleuth is not working cause it's omitting some spans.* NOTE: the SLF4J MDC is always set and logback users will immediately see the trace and span ids in logs per the example diff --git a/benchmarks/pom.xml b/benchmarks/pom.xml index 8e4564b0a..cf3b185c6 100644 --- a/benchmarks/pom.xml +++ b/benchmarks/pom.xml @@ -17,7 +17,7 @@ Benchmarks Benchmarks (JMH) org.springframework.cloud - 1.3.0.BUILD-SNAPSHOT + 1.3.0.RC1 benchmarks diff --git a/docs/pom.xml b/docs/pom.xml index 3816ec5fd..dd54e103d 100644 --- a/docs/pom.xml +++ b/docs/pom.xml @@ -5,7 +5,7 @@ org.springframework.cloud spring-cloud-sleuth - 1.3.0.BUILD-SNAPSHOT + 1.3.0.RC1 spring-cloud-sleuth-docs pom diff --git a/pom.xml b/pom.xml index d7db7f6a4..0131cf0d4 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ 4.0.0 spring-cloud-sleuth - 1.3.0.BUILD-SNAPSHOT + 1.3.0.RC1 pom Spring Cloud Sleuth Spring Cloud Sleuth @@ -13,7 +13,7 @@ org.springframework.cloud spring-cloud-build - 1.3.5.BUILD-SNAPSHOT + 1.3.5.RELEASE @@ -241,10 +241,10 @@ 1.8 2.19.1 2.17 - 1.3.5.BUILD-SNAPSHOT - 1.3.0.BUILD-SNAPSHOT - Ditmars.BUILD-SNAPSHOT - 1.4.0.BUILD-SNAPSHOT + 1.3.5.RELEASE + 1.3.0.RC1 + Ditmars.RELEASE + 1.4.0.RC1 3.1.0.RELEASE 1.0.0 diff --git a/spring-cloud-sleuth-core/pom.xml b/spring-cloud-sleuth-core/pom.xml index b6114a96e..54c4e3ba4 100644 --- a/spring-cloud-sleuth-core/pom.xml +++ b/spring-cloud-sleuth-core/pom.xml @@ -11,7 +11,7 @@ org.springframework.cloud spring-cloud-sleuth - 1.3.0.BUILD-SNAPSHOT + 1.3.0.RC1 .. diff --git a/spring-cloud-sleuth-dependencies/pom.xml b/spring-cloud-sleuth-dependencies/pom.xml index 353f3c4d0..54b9e03a5 100644 --- a/spring-cloud-sleuth-dependencies/pom.xml +++ b/spring-cloud-sleuth-dependencies/pom.xml @@ -5,11 +5,11 @@ spring-cloud-dependencies-parent org.springframework.cloud - 1.3.5.BUILD-SNAPSHOT + 1.3.5.RELEASE spring-cloud-sleuth-dependencies - 1.3.0.BUILD-SNAPSHOT + 1.3.0.RC1 pom spring-cloud-sleuth-dependencies Spring Cloud Sleuth Dependencies diff --git a/spring-cloud-sleuth-reactor/pom.xml b/spring-cloud-sleuth-reactor/pom.xml index f443d879e..52cc07ea0 100644 --- a/spring-cloud-sleuth-reactor/pom.xml +++ b/spring-cloud-sleuth-reactor/pom.xml @@ -11,7 +11,7 @@ org.springframework.cloud spring-cloud-sleuth - 1.3.0.BUILD-SNAPSHOT + 1.3.0.RC1 .. diff --git a/spring-cloud-sleuth-samples/pom.xml b/spring-cloud-sleuth-samples/pom.xml index 1a18a656e..77b02d4b9 100644 --- a/spring-cloud-sleuth-samples/pom.xml +++ b/spring-cloud-sleuth-samples/pom.xml @@ -12,7 +12,7 @@ org.springframework.cloud spring-cloud-sleuth - 1.3.0.BUILD-SNAPSHOT + 1.3.0.RC1 .. 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 62d0a3d70..2d5d6d2e3 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 @@ -20,7 +20,7 @@ org.springframework.cloud spring-cloud-sleuth-samples - 1.3.0.BUILD-SNAPSHOT + 1.3.0.RC1 .. 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 5380ce6be..4478b3737 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 - 1.3.0.BUILD-SNAPSHOT + 1.3.0.RC1 .. 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 13e63c2bc..e83d2a8e4 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 - 1.3.0.BUILD-SNAPSHOT + 1.3.0.RC1 .. 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 8aa15f999..fbd461a10 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 - 1.3.0.BUILD-SNAPSHOT + 1.3.0.RC1 .. 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 1720e7335..5918fa8da 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 - 1.3.0.BUILD-SNAPSHOT + 1.3.0.RC1 .. diff --git a/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-zipkin2/pom.xml b/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-zipkin2/pom.xml index 776b0fd75..4568ad930 100644 --- a/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-zipkin2/pom.xml +++ b/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-zipkin2/pom.xml @@ -27,7 +27,7 @@ org.springframework.cloud spring-cloud-sleuth-samples - 1.3.0.BUILD-SNAPSHOT + 1.3.0.RC1 .. 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 cb1e19950..ab19e19b7 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 - 1.3.0.BUILD-SNAPSHOT + 1.3.0.RC1 .. diff --git a/spring-cloud-sleuth-stream/pom.xml b/spring-cloud-sleuth-stream/pom.xml index d8e322442..75a81f78d 100644 --- a/spring-cloud-sleuth-stream/pom.xml +++ b/spring-cloud-sleuth-stream/pom.xml @@ -12,7 +12,7 @@ org.springframework.cloud spring-cloud-sleuth - 1.3.0.BUILD-SNAPSHOT + 1.3.0.RC1 diff --git a/spring-cloud-sleuth-zipkin-stream/pom.xml b/spring-cloud-sleuth-zipkin-stream/pom.xml index 86df93730..370e1e542 100644 --- a/spring-cloud-sleuth-zipkin-stream/pom.xml +++ b/spring-cloud-sleuth-zipkin-stream/pom.xml @@ -12,7 +12,7 @@ org.springframework.cloud spring-cloud-sleuth - 1.3.0.BUILD-SNAPSHOT + 1.3.0.RC1 diff --git a/spring-cloud-sleuth-zipkin/pom.xml b/spring-cloud-sleuth-zipkin/pom.xml index dd5e7561c..a5bdd8a72 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 - 1.3.0.BUILD-SNAPSHOT + 1.3.0.RC1 .. diff --git a/spring-cloud-sleuth-zipkin2/pom.xml b/spring-cloud-sleuth-zipkin2/pom.xml index 7266dc776..6d7a016bb 100644 --- a/spring-cloud-sleuth-zipkin2/pom.xml +++ b/spring-cloud-sleuth-zipkin2/pom.xml @@ -28,7 +28,7 @@ org.springframework.cloud spring-cloud-sleuth - 1.3.0.BUILD-SNAPSHOT + 1.3.0.RC1 .. diff --git a/spring-cloud-starter-sleuth/pom.xml b/spring-cloud-starter-sleuth/pom.xml index 7414bdae9..3df51fec8 100644 --- a/spring-cloud-starter-sleuth/pom.xml +++ b/spring-cloud-starter-sleuth/pom.xml @@ -5,7 +5,7 @@ org.springframework.cloud spring-cloud-sleuth - 1.3.0.BUILD-SNAPSHOT + 1.3.0.RC1 .. spring-cloud-starter-sleuth diff --git a/spring-cloud-starter-zipkin/pom.xml b/spring-cloud-starter-zipkin/pom.xml index 9a00b34ff..9a8974441 100644 --- a/spring-cloud-starter-zipkin/pom.xml +++ b/spring-cloud-starter-zipkin/pom.xml @@ -5,7 +5,7 @@ org.springframework.cloud spring-cloud-sleuth - 1.3.0.BUILD-SNAPSHOT + 1.3.0.RC1 .. spring-cloud-starter-zipkin diff --git a/spring-cloud-starter-zipkin2/pom.xml b/spring-cloud-starter-zipkin2/pom.xml index d7cd0f8f3..230cc197c 100644 --- a/spring-cloud-starter-zipkin2/pom.xml +++ b/spring-cloud-starter-zipkin2/pom.xml @@ -5,7 +5,7 @@ org.springframework.cloud spring-cloud-sleuth - 1.3.0.BUILD-SNAPSHOT + 1.3.0.RC1 .. spring-cloud-starter-zipkin2