Going back to snapshots

This commit is contained in:
buildmaster
2017-10-24 08:48:01 +00:00
parent 8950751782
commit 30d3379347
22 changed files with 141 additions and 53 deletions

View File

@@ -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-zipkin2` dependency.
If you want both Sleuth and Zipkin just add the `spring-cloud-starter-zipkin` 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-zipkin2` d
<dependency> <2>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-zipkin2</artifactId>
<artifactId>spring-cloud-starter-zipkin</artifactId>
</dependency>
----
<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-zipkin2`
<2> Add the dependency to `spring-cloud-starter-zipkin`
[source,groovy,indent=0,subs="verbatim,attributes",role="secondary"]
.Gradle
@@ -437,22 +437,16 @@ dependencyManagement { <1>
}
dependencies { <2>
compile "org.springframework.cloud:spring-cloud-starter-zipkin2"
compile "org.springframework.cloud:spring-cloud-starter-zipkin"
}
----
<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-zipkin2`
<2> Add the dependency to `spring-cloud-starter-zipkin`
==== Sleuth with Zipkin via RabbitMQ or Kafka
==== Sleuth with Zipkin via Spring Cloud Stream
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.
If you want both Sleuth and Zipkin just add the `spring-cloud-sleuth-stream` dependency.
[source,xml,indent=0,subs="verbatim,attributes",role="primary"]
.Maven
@@ -471,17 +465,23 @@ dependencies.
<dependency> <2>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-sleuth-starter-zipkin2</artifactId>
<artifactId>spring-cloud-sleuth-stream</artifactId>
</dependency>
<dependency> <3>
<groupId>org.springframework.amqp</groupId>
<artifactId>spring-rabbit</artifactId>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-sleuth</artifactId>
</dependency>
<!-- EXAMPLE FOR RABBIT BINDING -->
<dependency> <4>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-stream-binder-rabbit</artifactId>
</dependency>
----
<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-sleuth-zipkin2` - that way all dependent dependencies will be downloaded
<3> To automatically configure rabbit, simply add the spring-rabbit dependency
<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
[source,groovy,indent=0,subs="verbatim,attributes",role="secondary"]
.Gradle
@@ -493,14 +493,100 @@ dependencyManagement { <1>
}
dependencies {
compile "org.springframework.cloud:spring-cloud-starter-sleuth-zipkin2" <2>
compile "org.springframework.amqp:spring-rabbit" <3>
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>
}
----
<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-sleuth-zipkin2` - that way all dependent dependencies will be downloaded
<3> To automatically configure rabbit, simply add the spring-rabbit dependency
<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
----
<dependencyManagement> <1>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>${release.train.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependency> <2>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-sleuth-zipkin-stream</artifactId>
</dependency>
<dependency> <3>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-sleuth</artifactId>
</dependency>
<!-- EXAMPLE FOR RABBIT BINDING -->
<dependency> <4>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-stream-binder-rabbit</artifactId>
</dependency>
----
<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);
}
}
----
== Additional resources
@@ -553,13 +639,15 @@ 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-zipkin2` then the app will generate and collect Zipkin-compatible traces.
* If `spring-cloud-sleuth-zipkin` 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.
IMPORTANT: If using Zipkin, configure the percentage of spans exported using `spring.sleuth.sampler.percentage`
* 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`
(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

View File

@@ -17,7 +17,7 @@
<name>Benchmarks</name>
<description>Benchmarks (JMH)</description>
<groupId>org.springframework.cloud</groupId>
<version>1.3.0.RC1</version>
<version>1.3.0.BUILD-SNAPSHOT</version>
<artifactId>benchmarks</artifactId>
<properties>

View File

@@ -5,7 +5,7 @@
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-sleuth</artifactId>
<version>1.3.0.RC1</version>
<version>1.3.0.BUILD-SNAPSHOT</version>
</parent>
<artifactId>spring-cloud-sleuth-docs</artifactId>
<packaging>pom</packaging>

12
pom.xml
View File

@@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>spring-cloud-sleuth</artifactId>
<version>1.3.0.RC1</version>
<version>1.3.0.BUILD-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Spring Cloud Sleuth</name>
<description>Spring Cloud Sleuth</description>
@@ -13,7 +13,7 @@
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-build</artifactId>
<version>1.3.5.RELEASE</version>
<version>1.3.5.BUILD-SNAPSHOT</version>
<relativePath/>
<!-- lookup parent from repository -->
</parent>
@@ -241,10 +241,10 @@
<maven.compiler.testSource>1.8</maven.compiler.testSource>
<surefire.plugin.version>2.19.1</surefire.plugin.version>
<checkstyle.version>2.17</checkstyle.version>
<spring-cloud-build.version>1.3.5.RELEASE</spring-cloud-build.version>
<spring-cloud-commons.version>1.3.0.RC1</spring-cloud-commons.version>
<spring-cloud-stream.version>Ditmars.RELEASE</spring-cloud-stream.version>
<spring-cloud-netflix.version>1.4.0.RC1</spring-cloud-netflix.version>
<spring-cloud-build.version>1.3.5.BUILD-SNAPSHOT</spring-cloud-build.version>
<spring-cloud-commons.version>1.3.0.BUILD-SNAPSHOT</spring-cloud-commons.version>
<spring-cloud-stream.version>Ditmars.BUILD-SNAPSHOT</spring-cloud-stream.version>
<spring-cloud-netflix.version>1.4.0.BUILD-SNAPSHOT</spring-cloud-netflix.version>
<reactor.version>3.1.0.RELEASE</reactor.version>
<reactive-streams.version>1.0.0</reactive-streams.version>
</properties>

View File

@@ -11,7 +11,7 @@
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-sleuth</artifactId>
<version>1.3.0.RC1</version>
<version>1.3.0.BUILD-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>

View File

@@ -5,11 +5,11 @@
<parent>
<artifactId>spring-cloud-dependencies-parent</artifactId>
<groupId>org.springframework.cloud</groupId>
<version>1.3.5.RELEASE</version>
<version>1.3.5.BUILD-SNAPSHOT</version>
<relativePath/>
</parent>
<artifactId>spring-cloud-sleuth-dependencies</artifactId>
<version>1.3.0.RC1</version>
<version>1.3.0.BUILD-SNAPSHOT</version>
<packaging>pom</packaging>
<name>spring-cloud-sleuth-dependencies</name>
<description>Spring Cloud Sleuth Dependencies</description>

View File

@@ -11,7 +11,7 @@
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-sleuth</artifactId>
<version>1.3.0.RC1</version>
<version>1.3.0.BUILD-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>

View File

@@ -12,7 +12,7 @@
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-sleuth</artifactId>
<version>1.3.0.RC1</version>
<version>1.3.0.BUILD-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>

View File

@@ -20,7 +20,7 @@
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-sleuth-samples</artifactId>
<version>1.3.0.RC1</version>
<version>1.3.0.BUILD-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>

View File

@@ -28,7 +28,7 @@
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-sleuth-samples</artifactId>
<version>1.3.0.RC1</version>
<version>1.3.0.BUILD-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>

View File

@@ -28,7 +28,7 @@
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-sleuth-samples</artifactId>
<version>1.3.0.RC1</version>
<version>1.3.0.BUILD-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>

View File

@@ -28,7 +28,7 @@
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-sleuth-samples</artifactId>
<version>1.3.0.RC1</version>
<version>1.3.0.BUILD-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>

View File

@@ -28,7 +28,7 @@
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-sleuth-samples</artifactId>
<version>1.3.0.RC1</version>
<version>1.3.0.BUILD-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>

View File

@@ -27,7 +27,7 @@
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-sleuth-samples</artifactId>
<version>1.3.0.RC1</version>
<version>1.3.0.BUILD-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>

View File

@@ -28,7 +28,7 @@
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-sleuth-samples</artifactId>
<version>1.3.0.RC1</version>
<version>1.3.0.BUILD-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>

View File

@@ -12,7 +12,7 @@
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-sleuth</artifactId>
<version>1.3.0.RC1</version>
<version>1.3.0.BUILD-SNAPSHOT</version>
</parent>
<dependencies>

View File

@@ -12,7 +12,7 @@
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-sleuth</artifactId>
<version>1.3.0.RC1</version>
<version>1.3.0.BUILD-SNAPSHOT</version>
</parent>
<properties>

View File

@@ -28,7 +28,7 @@
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-sleuth</artifactId>
<version>1.3.0.RC1</version>
<version>1.3.0.BUILD-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>

View File

@@ -28,7 +28,7 @@
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-sleuth</artifactId>
<version>1.3.0.RC1</version>
<version>1.3.0.BUILD-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>

View File

@@ -5,7 +5,7 @@
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-sleuth</artifactId>
<version>1.3.0.RC1</version>
<version>1.3.0.BUILD-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<artifactId>spring-cloud-starter-sleuth</artifactId>

View File

@@ -5,7 +5,7 @@
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-sleuth</artifactId>
<version>1.3.0.RC1</version>
<version>1.3.0.BUILD-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<artifactId>spring-cloud-starter-zipkin</artifactId>

View File

@@ -5,7 +5,7 @@
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-sleuth</artifactId>
<version>1.3.0.RC1</version>
<version>1.3.0.BUILD-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<artifactId>spring-cloud-starter-zipkin2</artifactId>