diff --git a/spring-cloud-sleuth.html b/spring-cloud-sleuth.html index 79f933e7d..bb7437b9e 100644 --- a/spring-cloud-sleuth.html +++ b/spring-cloud-sleuth.html @@ -722,13 +722,308 @@ If you want to use Grok together with the logs from Cloud Foundry you have to us

Adding to the project

+
+

Only Sleuth (log correlation)

-

In general if you want to profit only from Spring Cloud Sleuth without the Zipkin integration just add -the spring-cloud-starter-sleuth module to your project.

+

If you want to profit only from Spring Cloud Sleuth without the Zipkin integration just add +the *spring-cloud-starter-sleuth1 module to your project.

+
+
Maven
+
+
<dependencyManagement> (1)
+         <dependencies>
+             <dependency>
+                 <groupId>org.springframework.cloud</groupId>
+                 <artifactId>spring-cloud-dependencies</artifactId>
+                 <version>Brixton.RC2</version>
+                 <type>pom</type>
+                 <scope>import</scope>
+             </dependency>
+         </dependencies>
+   </dependencyManagement>
+
+   <dependency> (2)
+       <groupId>org.springframework.cloud</groupId>
+       <artifactId>spring-cloud-starter-sleuth</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. +
  3. +

    Add the dependency to spring-cloud-starter-sleuth

    +
  4. +
+
+
+
Gradle
+
+
dependencyManagement { (1)
+    imports {
+        mavenBom "org.springframework.cloud:spring-cloud-dependencies:Brixton.RC2"
+    }
+}
+
+dependencies { (2)
+    compile "org.springframework.cloud:spring-cloud-starter-sleuth"
+}
+
+
+
+
    +
  1. +

    In order not to pick versions by yourself it’s much better if you add the dependency management via +the Spring BOM

    +
  2. +
  3. +

    Add the dependency to spring-cloud-starter-sleuth

    +
  4. +
+
+
+
+

Sleuth with Zipkin via HTTP

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

+
+
Maven
+
+
<dependencyManagement> (1)
+         <dependencies>
+             <dependency>
+                 <groupId>org.springframework.cloud</groupId>
+                 <artifactId>spring-cloud-dependencies</artifactId>
+                 <version>Brixton.RC2</version>
+                 <type>pom</type>
+                 <scope>import</scope>
+             </dependency>
+         </dependencies>
+   </dependencyManagement>
+
+   <dependency> (2)
+       <groupId>org.springframework.cloud</groupId>
+       <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. +
  3. +

    Add the dependency to spring-cloud-starter-zipkin

    +
  4. +
+
+
+
Gradle
+
+
dependencyManagement { (1)
+    imports {
+        mavenBom "org.springframework.cloud:spring-cloud-dependencies:Brixton.RC2"
+    }
+}
+
+dependencies { (2)
+    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. +
  3. +

    Add the dependency to spring-cloud-starter-zipkin

    +
  4. +
+
+
+
+

Sleuth with Zipkin via Spring Cloud Stream

+
+

If you want both Sleuth and Zipkin just add the spring-cloud-sleuth-stream dependency.

+
+
+
Maven
+
+
<dependencyManagement> (1)
+         <dependencies>
+             <dependency>
+                 <groupId>org.springframework.cloud</groupId>
+                 <artifactId>spring-cloud-dependencies</artifactId>
+                 <version>Brixton.RC2</version>
+                 <type>pom</type>
+                 <scope>import</scope>
+             </dependency>
+         </dependencies>
+   </dependencyManagement>
+
+   <dependency> (2)
+       <groupId>org.springframework.cloud</groupId>
+       <artifactId>spring-cloud-sleuth-stream</artifactId>
+   </dependency>
+   <!-- EXAMPLE FOR RABBIT BINDING -->
+   <dependency> (3)
+       <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. +
  3. +

    Add the dependency to spring-cloud-sleuth-stream

    +
  4. +
  5. +

    Add a binder (e.g. Rabbit binder) to tell Spring Cloud Stream what it should bind to

    +
  6. +
+
+
+
Gradle
+
+
dependencyManagement { (1)
+    imports {
+        mavenBom "org.springframework.cloud:spring-cloud-dependencies:Brixton.RC2"
+    }
+}
+
+dependencies {
+    compile "org.springframework.cloud:spring-cloud-sleuth-stream" (2)
+    // Example for Rabbit binding
+    compile "org.springframework.cloud:spring-cloud-stream-binder-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. +
  3. +

    Add the dependency to spring-cloud-sleuth-stream

    +
  4. +
  5. +

    Add a binder (e.g. Rabbit binder) to tell Spring Cloud Stream what it should bind to

    +
  6. +
+
+
+
+

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

+
+
+
Maven
+
+
<dependencyManagement> (1)
+         <dependencies>
+             <dependency>
+                 <groupId>org.springframework.cloud</groupId>
+                 <artifactId>spring-cloud-dependencies</artifactId>
+                 <version>Brixton.RC2</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>
+   <!-- EXAMPLE FOR RABBIT BINDING -->
+   <dependency> (3)
+       <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. +
  3. +

    Add the dependency to spring-cloud-sleuth-zipkin-stream

    +
  4. +
  5. +

    Add a binder (e.g. Rabbit binder) to tell Spring Cloud Stream what it should bind to

    +
  6. +
+
+
+
Gradle
+
+
dependencyManagement { (1)
+    imports {
+        mavenBom "org.springframework.cloud:spring-cloud-dependencies:Brixton.RC2"
+    }
+}
+
+dependencies {
+    compile "org.springframework.cloud:spring-cloud-sleuth-zipkin-stream" (2)
+    // Example for Rabbit binding
+    compile "org.springframework.cloud:spring-cloud-stream-binder-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. +
  3. +

    Add the dependency to spring-cloud-sleuth-zipkin-stream

    +
  4. +
  5. +

    Add a binder (e.g. Rabbit binder) to tell Spring Cloud Stream what it should bind to

    +
  6. +
+
+
+

and then just annotate your main class with @EnableZipkinStreamServer annotation:

+
+
+
+
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);
+	}
+
+}
+
+
+

Features

@@ -1658,8 +1953,8 @@ however will be still there.

@Async annotated methods

-

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

+

In Spring Cloud Sleuth we’re instrumenting async related components so that the tracing information is passed between threads. +You can disable this behaviour by setting the value of spring.sleuth.async.enabled to false.

If you annotate your method with @Async then we’ll automatically create a new Span with the following characteristics:

@@ -1758,7 +2053,7 @@ To disable Zuul support set the spring.sleuth.zuul.enabled property