diff --git a/2.1.x/multi/multi__features.html b/2.1.x/multi/multi__features.html
index 58c7029fa..7f93ddcbd 100644
--- a/2.1.x/multi/multi__features.html
+++ b/2.1.x/multi/multi__features.html
@@ -11,7 +11,7 @@ To that end, Sleuth:
Sleuth can propagate context (also known as baggage) between processes.
Consequently, if you set a baggage element on a Span, it is sent downstream to other processes over either HTTP or messaging.
Provides a way to create or continue spans and add tags and logs through annotations.
If spring-cloud-sleuth-zipkin is on the classpath, the app generates and collects Zipkin-compatible traces.
By default, it sends them over HTTP to a Zipkin server on localhost (port 9411).
-You can configure the location of the service by setting spring.zipkin.baseUrl.
If you depend on spring-rabbit, your app sends traces to a RabbitMQ broker instead of HTTP.
If you depend on spring-kafka, and set spring.zipkin.sender.type: kafka, your app sends traces to a Kafka broker instead of HTTP.
Caution
spring-cloud-sleuth-stream is deprecated and should no longer be used.
If you use Zipkin, configure the probability of spans exported by setting spring.sleuth.sampler.probability
+You can configure the location of the service by setting spring.zipkin.baseUrl.
If you depend on spring-rabbit, your app sends traces to a RabbitMQ broker instead of HTTP.
If you depend on spring-kafka, and set spring.zipkin.sender.type: kafka, your app sends traces to a Kafka broker instead of HTTP.
Caution
spring-cloud-sleuth-stream is deprecated and should no longer be used.
If you use Zipkin, configure the probability of spans exported by setting spring.sleuth.sampler.probability
(default: 0.1, which is 10 percent). Otherwise, you might think that Sleuth is not working be cause it omits some spans.
Note
The SLF4J MDC is always set and logback users immediately see the trace and span IDs in logs per the example
shown earlier.
Other logging systems have to configure their own formatter to get the same result.
@@ -80,7 +80,7 @@ The former is simpler to understand and test and does not tempt users with span
void userCode() {
span.annotate("tx.started");
...
-}
Spring Cloud Sleuth is compatible with OpenTracing.
If you have OpenTracing on the classpath, we automatically register the OpenTracing Tracer bean.
If you wish to disable this, set spring.sleuth.opentracing.enabled to false
15.2 Runnable and Callable
If you wrap your logic in Runnable or Callable, you can wrap those classes in their Sleuth representative, as shown in the following example for Runnable:
Runnable runnable = new Runnable() {
@Override
@@ -111,7 +111,7 @@ In the following snippet, you can see an example of how to set up such a custom
}
}
15.6.3 WebClient
We inject a ExchangeFilterFunction implementation that creates a span and, through on-success and on-error callbacks, takes care of closing client-side spans.
To block this feature, set spring.sleuth.web.client.enabled to false.
Important
You have to register WebClient as a bean so that the tracing instrumentation gets applied.
-If you create a WebClient instance with a new keyword, the instrumentation does NOT work.
15.6.4 Traverson
If you use the Traverson library, you can inject a RestTemplate as a bean into your Traverson object.
+If you create a WebClient instance with a new keyword, the instrumentation does NOT work.
15.6.4 Traverson
If you use the Traverson library, you can inject a RestTemplate as a bean into your Traverson object.
Since RestTemplate is already intercepted, you get full support for tracing in your client. The following pseudo code
shows how to do that:
@Autowired RestTemplate restTemplate;
@@ -170,7 +170,7 @@ The following example shows how to set up such a custom Ex
}
Tip
To ensure that your configuration gets post processed, remember
to add the @Role(BeanDefinition.ROLE_INFRASTRUCTURE) on your
-@Configuration class
15.10 Messaging
Features from this section can be disabled by setting the spring.sleuth.messaging.enabled property with value equal to false.
15.10.1 Spring Integration and Spring Cloud Stream
Spring Cloud Sleuth integrates with Spring Integration.
+@Configuration class
15.10 Messaging
Features from this section can be disabled by setting the spring.sleuth.messaging.enabled property with value equal to false.
15.10.1 Spring Integration and Spring Cloud Stream
Spring Cloud Sleuth integrates with Spring Integration.
It creates spans for publish and subscribe events.
To disable Spring Integration instrumentation, set spring.sleuth.integration.enabled to false.
You can provide the spring.sleuth.integration.patterns pattern to explicitly provide the names of channels that you want to include for tracing.
By default, all channels but hystrixStreamOutput channel are included.
Important
When using the Executor to build a Spring Integration IntegrationFlow, you must use the untraced version of the Executor.
diff --git a/2.1.x/multi/multi__introduction.html b/2.1.x/multi/multi__introduction.html
index 004efac97..86b143d57 100644
--- a/2.1.x/multi/multi__introduction.html
+++ b/2.1.x/multi/multi__introduction.html
@@ -1,6 +1,6 @@
Span: The basic unit of work. For example, sending an RPC is a new span, as is sending a response to an RPC.
Spans are identified by a unique 64-bit ID for the span and another 64-bit ID for the trace the span is a part of.
Spans also have other data, such as descriptions, timestamped events, key-value annotations (tags), the ID of the span that caused them, and process IDs (normally IP addresses).
Spans can be started and stopped, and they keep track of their timing information.
Once you create a span, you must stop it at some point in the future.
Tip
The initial span that starts a trace is called a root span. The value of the ID
@@ -35,13 +35,13 @@ to service1 and three spans related to RPC calls.
When an exception was thrown and was not caught, we set proper tags on the span, which Zipkin can then properly colorize.
You could see in the list of traces one trace that is red. That appears because an exception was thrown.
If you click that trace, you see a similar picture, as follows:
If you then click on one of the spans, you see the following
The span shows the reason for the error and the whole stack trace related to it.
1.2.3 Distributed Tracing with Brave
Starting with version 2.0.0, Spring Cloud Sleuth uses Brave as the tracing library.
Consequently, Sleuth no longer takes care of storing the context but delegates that work to Brave.
Due to the fact that Sleuth had different naming and tagging conventions than Brave, we decided to follow Brave’s conventions from now on.
-However, if you want to use the legacy Sleuth approaches, you can set the spring.sleuth.http.legacy.enabled property to true.
1.2.4 Live examples
Figure 1.1. Click the Pivotal Web Services icon to see it live!
When using grep to read the logs of those four applications by scanning for a trace ID equal to (for example) 2485ec27856c56f4, you get output resembling the following:
service1.log:2016-02-26 11:15:47.561 INFO [service1,2485ec27856c56f4,2485ec27856c56f4,true] 68058 --- [nio-8081-exec-1] i.s.c.sleuth.docs.service1.Application : Hello from service1. Calling service2
+However, if you want to use the legacy Sleuth approaches, you can set the spring.sleuth.http.legacy.enabled property to true.
1.2.4 Live examples
Figure 1.1. Click the Pivotal Web Services icon to see it live!
When using grep to read the logs of those four applications by scanning for a trace ID equal to (for example) 2485ec27856c56f4, you get output resembling the following:
service1.log:2016-02-26 11:15:47.561 INFO [service1,2485ec27856c56f4,2485ec27856c56f4,true] 68058 --- [nio-8081-exec-1] i.s.c.sleuth.docs.service1.Application : Hello from service1. Calling service2
service2.log:2016-02-26 11:15:47.710 INFO [service2,2485ec27856c56f4,9aa10ee6fbde75fa,true] 68059 --- [nio-8082-exec-1] i.s.c.sleuth.docs.service2.Application : Hello from service2. Calling service3 and then service4
service3.log:2016-02-26 11:15:47.895 INFO [service3,2485ec27856c56f4,1210be13194bfe5,true] 68060 --- [nio-8083-exec-1] i.s.c.sleuth.docs.service3.Application : Hello from service3
service2.log:2016-02-26 11:15:47.924 INFO [service2,2485ec27856c56f4,9aa10ee6fbde75fa,true] 68059 --- [nio-8082-exec-1] i.s.c.sleuth.docs.service2.Application : Got response from service3 [Hello from service3]
service4.log:2016-02-26 11:15:48.134 INFO [service4,2485ec27856c56f4,1b1845262ffba49d,true] 68061 --- [nio-8084-exec-1] i.s.c.sleuth.docs.service4.Application : Hello from service4
service2.log:2016-02-26 11:15:48.156 INFO [service2,2485ec27856c56f4,9aa10ee6fbde75fa,true] 68059 --- [nio-8082-exec-1] i.s.c.sleuth.docs.service2.Application : Got response from service4 [Hello from service4]
-service1.log:2016-02-26 11:15:48.182 INFO [service1,2485ec27856c56f4,2485ec27856c56f4,true] 68058 --- [nio-8081-exec-1] i.s.c.sleuth.docs.service1.Application : Got response from service2 [Hello from service2, response from service3 [Hello from service3] and from service4 [Hello from service4]]
If you use a log aggregating tool (such as Kibana, Splunk, and others), you can order the events that took place.
+service1.log:2016-02-26 11:15:48.182 INFO [service1,2485ec27856c56f4,2485ec27856c56f4,true] 68058 --- [nio-8081-exec-1] i.s.c.sleuth.docs.service1.Application : Got response from service2 [Hello from service2, response from service3 [Hello from service3] and from service4 [Hello from service4]]
If you use a log aggregating tool (such as Kibana, Splunk, and others), you can order the events that took place.
An example from Kibana would resemble the following image:
If you want to use Logstash, the following listing shows the Grok pattern for Logstash:
\ No newline at end of file
diff --git a/2.1.x/multi/multi__sending_spans_to_zipkin.html b/2.1.x/multi/multi__sending_spans_to_zipkin.html
index 7be4ee111..f89d22c9e 100644
--- a/2.1.x/multi/multi__sending_spans_to_zipkin.html
+++ b/2.1.x/multi/multi__sending_spans_to_zipkin.html
@@ -2,7 +2,7 @@
13. Sending Spans to Zipkin
By default, if you add spring-cloud-starter-zipkin as a dependency to your project, when the span is closed, it is sent to Zipkin over HTTP.
The communication is asynchronous.
-You can configure the URL by setting the spring.zipkin.baseUrl property, as follows:
If you want to find Zipkin through service discovery, you can pass the Zipkin’s service ID inside the URL, as shown in the following example for zipkinserver service ID:
spring.zipkin.baseUrl: http://zipkinserver/
To disable this feature just set spring.zipkin.discoveryClientEnabled to `false.
When the Discovery Client feature is enabled, Sleuth uses
+You can configure the URL by setting the spring.zipkin.baseUrl property, as follows:
If you want to find Zipkin through service discovery, you can pass the Zipkin’s service ID inside the URL, as shown in the following example for zipkinserver service ID:
spring.zipkin.baseUrl: http://zipkinserver/
To disable this feature just set spring.zipkin.discoveryClientEnabled to `false.
When the Discovery Client feature is enabled, Sleuth uses
LoadBalancerClient to find the URL of the Zipkin Server. It means
that you can set up the load balancing configuration e.g. via Ribbon.
We recommend using Zipkin’s native support for message-based span sending.
Starting from the Edgware release, the Zipkin Stream server is deprecated.
-In the Finchley release, it got removed.
If for some reason you need to create the deprecated Stream Zipkin server, see the Dalston Documentation.
\ No newline at end of file
+In the Finchley release, it got removed.
If for some reason you need to create the deprecated Stream Zipkin server, see the Dalston Documentation.
\ No newline at end of file
diff --git a/2.1.x/single/spring-cloud-sleuth.html b/2.1.x/single/spring-cloud-sleuth.html
index 5f69bec77..9b724f3cc 100644
--- a/2.1.x/single/spring-cloud-sleuth.html
+++ b/2.1.x/single/spring-cloud-sleuth.html
@@ -1,6 +1,6 @@
- Spring Cloud Sleuth
Spring Cloud Sleuth
Adrian Cole, Spencer Gibb, Marcin Grzejszczak, Dave Syer, Jay Bryant
Span: The basic unit of work. For example, sending an RPC is a new span, as is sending a response to an RPC.
Spans are identified by a unique 64-bit ID for the span and another 64-bit ID for the trace the span is a part of.
Spans also have other data, such as descriptions, timestamped events, key-value annotations (tags), the ID of the span that caused them, and process IDs (normally IP addresses).
Spans can be started and stopped, and they keep track of their timing information.
Once you create a span, you must stop it at some point in the future.
Tip
The initial span that starts a trace is called a root span. The value of the ID
@@ -35,13 +35,13 @@ to service1 and three spans related to RPC calls.
When an exception was thrown and was not caught, we set proper tags on the span, which Zipkin can then properly colorize.
You could see in the list of traces one trace that is red. That appears because an exception was thrown.
If you click that trace, you see a similar picture, as follows:
If you then click on one of the spans, you see the following
The span shows the reason for the error and the whole stack trace related to it.
1.2.3 Distributed Tracing with Brave
Starting with version 2.0.0, Spring Cloud Sleuth uses Brave as the tracing library.
Consequently, Sleuth no longer takes care of storing the context but delegates that work to Brave.
Due to the fact that Sleuth had different naming and tagging conventions than Brave, we decided to follow Brave’s conventions from now on.
-However, if you want to use the legacy Sleuth approaches, you can set the spring.sleuth.http.legacy.enabled property to true.
1.2.4 Live examples
Figure 1.1. Click the Pivotal Web Services icon to see it live!
When using grep to read the logs of those four applications by scanning for a trace ID equal to (for example) 2485ec27856c56f4, you get output resembling the following:
service1.log:2016-02-26 11:15:47.561 INFO [service1,2485ec27856c56f4,2485ec27856c56f4,true] 68058 --- [nio-8081-exec-1] i.s.c.sleuth.docs.service1.Application : Hello from service1. Calling service2
+However, if you want to use the legacy Sleuth approaches, you can set the spring.sleuth.http.legacy.enabled property to true.
1.2.4 Live examples
Figure 1.1. Click the Pivotal Web Services icon to see it live!
When using grep to read the logs of those four applications by scanning for a trace ID equal to (for example) 2485ec27856c56f4, you get output resembling the following:
service1.log:2016-02-26 11:15:47.561 INFO [service1,2485ec27856c56f4,2485ec27856c56f4,true] 68058 --- [nio-8081-exec-1] i.s.c.sleuth.docs.service1.Application : Hello from service1. Calling service2
service2.log:2016-02-26 11:15:47.710 INFO [service2,2485ec27856c56f4,9aa10ee6fbde75fa,true] 68059 --- [nio-8082-exec-1] i.s.c.sleuth.docs.service2.Application : Hello from service2. Calling service3 and then service4
service3.log:2016-02-26 11:15:47.895 INFO [service3,2485ec27856c56f4,1210be13194bfe5,true] 68060 --- [nio-8083-exec-1] i.s.c.sleuth.docs.service3.Application : Hello from service3
service2.log:2016-02-26 11:15:47.924 INFO [service2,2485ec27856c56f4,9aa10ee6fbde75fa,true] 68059 --- [nio-8082-exec-1] i.s.c.sleuth.docs.service2.Application : Got response from service3 [Hello from service3]
service4.log:2016-02-26 11:15:48.134 INFO [service4,2485ec27856c56f4,1b1845262ffba49d,true] 68061 --- [nio-8084-exec-1] i.s.c.sleuth.docs.service4.Application : Hello from service4
service2.log:2016-02-26 11:15:48.156 INFO [service2,2485ec27856c56f4,9aa10ee6fbde75fa,true] 68059 --- [nio-8082-exec-1] i.s.c.sleuth.docs.service2.Application : Got response from service4 [Hello from service4]
-service1.log:2016-02-26 11:15:48.182 INFO [service1,2485ec27856c56f4,2485ec27856c56f4,true] 68058 --- [nio-8081-exec-1] i.s.c.sleuth.docs.service1.Application : Got response from service2 [Hello from service2, response from service3 [Hello from service3] and from service4 [Hello from service4]]
If you use a log aggregating tool (such as Kibana, Splunk, and others), you can order the events that took place.
+service1.log:2016-02-26 11:15:48.182 INFO [service1,2485ec27856c56f4,2485ec27856c56f4,true] 68058 --- [nio-8081-exec-1] i.s.c.sleuth.docs.service1.Application : Got response from service2 [Hello from service2, response from service3 [Hello from service3] and from service4 [Hello from service4]]
If you use a log aggregating tool (such as Kibana, Splunk, and others), you can order the events that took place.
An example from Kibana would resemble the following image:
If you want to use Logstash, the following listing shows the Grok pattern for Logstash:
filter {
# pattern matching logback pattern
grok {
@@ -300,7 +300,7 @@ To that end, Sleuth:
Sleuth can propagate context (also known as baggage) between processes.
Consequently, if you set a baggage element on a Span, it is sent downstream to other processes over either HTTP or messaging.
Provides a way to create or continue spans and add tags and logs through annotations.
If spring-cloud-sleuth-zipkin is on the classpath, the app generates and collects Zipkin-compatible traces.
By default, it sends them over HTTP to a Zipkin server on localhost (port 9411).
-You can configure the location of the service by setting spring.zipkin.baseUrl.
If you depend on spring-rabbit, your app sends traces to a RabbitMQ broker instead of HTTP.
If you depend on spring-kafka, and set spring.zipkin.sender.type: kafka, your app sends traces to a Kafka broker instead of HTTP.
Caution
spring-cloud-sleuth-stream is deprecated and should no longer be used.
If you use Zipkin, configure the probability of spans exported by setting spring.sleuth.sampler.probability
+You can configure the location of the service by setting spring.zipkin.baseUrl.
If you depend on spring-rabbit, your app sends traces to a RabbitMQ broker instead of HTTP.
If you depend on spring-kafka, and set spring.zipkin.sender.type: kafka, your app sends traces to a Kafka broker instead of HTTP.
Caution
spring-cloud-sleuth-stream is deprecated and should no longer be used.
If you use Zipkin, configure the probability of spans exported by setting spring.sleuth.sampler.probability
(default: 0.1, which is 10 percent). Otherwise, you might think that Sleuth is not working be cause it omits some spans.
Note
The SLF4J MDC is always set and logback users immediately see the trace and span IDs in logs per the example
shown earlier.
Other logging systems have to configure their own formatter to get the same result.
@@ -369,7 +369,7 @@ The former is simpler to understand and test and does not tempt users with span
void userCode() {
span.annotate("tx.started");
...
-}
RPC tracing is often done automatically by interceptors. Behind the scenes, they add tags and events that relate to their role in an RPC operation.
The following example shows how to add a client span:
@Autowired Tracing tracing;
@Autowired Tracer tracer;
// before you send a request, add metadata that describes the operation
@@ -809,7 +809,7 @@ It is NOT about finding Zipkin thro
The default approach is to take these values from server properties.
If those are not set, we try to retrieve the host name from the network interfaces.
If you have the discovery client enabled and prefer to retrieve the host address from the registered instance in a service registry, you have to set the spring.zipkin.locator.discovery.enabled property (it is applicable for both HTTP-based and Stream-based span reporting), as follows:
spring.zipkin.locator.discovery.enabled: true
13. Sending Spans to Zipkin
By default, if you add spring-cloud-starter-zipkin as a dependency to your project, when the span is closed, it is sent to Zipkin over HTTP.
The communication is asynchronous.
-You can configure the URL by setting the spring.zipkin.baseUrl property, as follows:
If you want to find Zipkin through service discovery, you can pass the Zipkin’s service ID inside the URL, as shown in the following example for zipkinserver service ID:
spring.zipkin.baseUrl: http://zipkinserver/
To disable this feature just set spring.zipkin.discoveryClientEnabled to `false.
When the Discovery Client feature is enabled, Sleuth uses
+You can configure the URL by setting the spring.zipkin.baseUrl property, as follows:
If you want to find Zipkin through service discovery, you can pass the Zipkin’s service ID inside the URL, as shown in the following example for zipkinserver service ID:
spring.zipkin.baseUrl: http://zipkinserver/
To disable this feature just set spring.zipkin.discoveryClientEnabled to `false.
When the Discovery Client feature is enabled, Sleuth uses
LoadBalancerClient to find the URL of the Zipkin Server. It means
that you can set up the load balancing configuration e.g. via Ribbon.
zipkinserver:
ribbon:
@@ -834,7 +834,7 @@ object, you will have to create a bean of zipkin2.reporter
return myCustomSender(zipkin, restTemplate);
}
14. Zipkin Stream Span Consumer
Important
We recommend using Zipkin’s native support for message-based span sending.
Starting from the Edgware release, the Zipkin Stream server is deprecated.
-In the Finchley release, it got removed.
If for some reason you need to create the deprecated Stream Zipkin server, see the Dalston Documentation.
15. Integrations
15.1 OpenTracing
Spring Cloud Sleuth is compatible with OpenTracing.
+In the Finchley release, it got removed.
If for some reason you need to create the deprecated Stream Zipkin server, see the Dalston Documentation.
15. Integrations
15.1 OpenTracing
Spring Cloud Sleuth is compatible with OpenTracing.
If you have OpenTracing on the classpath, we automatically register the OpenTracing Tracer bean.
If you wish to disable this, set spring.sleuth.opentracing.enabled to false
15.2 Runnable and Callable
If you wrap your logic in Runnable or Callable, you can wrap those classes in their Sleuth representative, as shown in the following example for Runnable:
Runnable runnable = new Runnable() {
@Override
@@ -945,7 +945,7 @@ In the following snippet, you can see an example of how to set up such a custom
}
}
15.6.3 WebClient
We inject a ExchangeFilterFunction implementation that creates a span and, through on-success and on-error callbacks, takes care of closing client-side spans.
To block this feature, set spring.sleuth.web.client.enabled to false.
Important
You have to register WebClient as a bean so that the tracing instrumentation gets applied.
-If you create a WebClient instance with a new keyword, the instrumentation does NOT work.
15.6.4 Traverson
If you use the Traverson library, you can inject a RestTemplate as a bean into your Traverson object.
+If you create a WebClient instance with a new keyword, the instrumentation does NOT work.
15.6.4 Traverson
If you use the Traverson library, you can inject a RestTemplate as a bean into your Traverson object.
Since RestTemplate is already intercepted, you get full support for tracing in your client. The following pseudo code
shows how to do that:
@Autowired RestTemplate restTemplate;
@@ -1004,7 +1004,7 @@ The following example shows how to set up such a custom Ex
}
Tip
To ensure that your configuration gets post processed, remember
to add the @Role(BeanDefinition.ROLE_INFRASTRUCTURE) on your
-@Configuration class
15.10 Messaging
Features from this section can be disabled by setting the spring.sleuth.messaging.enabled property with value equal to false.
15.10.1 Spring Integration and Spring Cloud Stream
Spring Cloud Sleuth integrates with Spring Integration.
+@Configuration class
15.10 Messaging
Features from this section can be disabled by setting the spring.sleuth.messaging.enabled property with value equal to false.
15.10.1 Spring Integration and Spring Cloud Stream
Spring Cloud Sleuth integrates with Spring Integration.
It creates spans for publish and subscribe events.
To disable Spring Integration instrumentation, set spring.sleuth.integration.enabled to false.
You can provide the spring.sleuth.integration.patterns pattern to explicitly provide the names of channels that you want to include for tracing.
By default, all channels but hystrixStreamOutput channel are included.
Important
When using the Executor to build a Spring Integration IntegrationFlow, you must use the untraced version of the Executor.
@@ -1015,7 +1015,7 @@ so that tracing headers get injected into the created Spring Kafka’s
Producer and Consumer.
To block this feature, set spring.sleuth.messaging.kafka.enabled to false.
15.10.4 Spring JMS
We instrument the JmsTemplate so that tracing headers get injected
into the message. We also support @JmsListener annotated methods on the consumer side.
To block this feature, set spring.sleuth.messaging.jms.enabled to false.
Important
We don’t support baggage propagation for JMS
15.11 Zuul
We instrument the Zuul Ribbon integration by enriching the Ribbon requests with tracing information.
To disable Zuul support, set the spring.sleuth.zuul.enabled property to false.
16. Running examples
You can see the running examples deployed in the Pivotal Web Services.
-Check them out at the following links:
\ No newline at end of file
diff --git a/2.1.x/spring-cloud-sleuth.xml b/2.1.x/spring-cloud-sleuth.xml
index 95eac4e28..f6464d545 100644
--- a/2.1.x/spring-cloud-sleuth.xml
+++ b/2.1.x/spring-cloud-sleuth.xml
@@ -18,10 +18,10 @@
Introduction
-Spring Cloud Sleuth implements a distributed tracing solution for Spring Cloud.
+Spring Cloud Sleuth implements a distributed tracing solution for Spring Cloud.Terminology
-Spring Cloud Sleuth borrows Dapper’s terminology.
+Spring Cloud Sleuth borrows Dapper’s terminology.Span: The basic unit of work. For example, sending an RPC is a new span, as is sending a response to an RPC.
Spans are identified by a unique 64-bit ID for the span and another 64-bit ID for the trace the span is a part of.
Spans also have other data, such as descriptions, timestamped events, key-value annotations (tags), the ID of the span that caused them, and process IDs (normally IP addresses).
@@ -183,7 +183,7 @@ However, if you want to use the legacy Sleuth approaches, you can set the Zipkin deployed on Pivotal Web Services
-Click here to see it live!
+Click here to see it live!The dependency graph in Zipkin should resemble the following image:
@@ -202,7 +202,7 @@ However, if you want to use the legacy Sleuth approaches, you can set the Zipkin deployed on Pivotal Web Services
-Click here to see it live!
+Click here to see it live!Log correlation
@@ -214,7 +214,7 @@ service2.log:2016-02-26 11:15:47.924 INFO [service2,2485ec27856c56f4,9aa10ee6fb
service4.log:2016-02-26 11:15:48.134 INFO [service4,2485ec27856c56f4,1b1845262ffba49d,true] 68061 --- [nio-8084-exec-1] i.s.c.sleuth.docs.service4.Application : Hello from service4
service2.log:2016-02-26 11:15:48.156 INFO [service2,2485ec27856c56f4,9aa10ee6fbde75fa,true] 68059 --- [nio-8082-exec-1] i.s.c.sleuth.docs.service2.Application : Got response from service4 [Hello from service4]
service1.log:2016-02-26 11:15:48.182 INFO [service1,2485ec27856c56f4,2485ec27856c56f4,true] 68058 --- [nio-8081-exec-1] i.s.c.sleuth.docs.service1.Application : Got response from service2 [Hello from service2, response from service3 [Hello from service3] and from service4 [Hello from service4]]
-If you use a log aggregating tool (such as Kibana, Splunk, and others), you can order the events that took place.
+If you use a log aggregating tool (such as Kibana, Splunk, and others), you can order the events that took place.
An example from Kibana would resemble the following image:
@@ -745,7 +745,7 @@ You can configure the location of the service by setting spring.zipkin.
-Spring Cloud Sleuth is OpenTracing compatible.
+Spring Cloud Sleuth is OpenTracing compatible.
@@ -872,7 +872,7 @@ void userCode() {
RPC tracing
-Check for instrumentation written here and Zipkin’s list before rolling your own RPC instrumentation.
+Check for instrumentation written here and Zipkin’s list before rolling your own RPC instrumentation.RPC tracing is often done automatically by interceptors. Behind the scenes, they add tags and events that relate to their role in an RPC operation.The following example shows how to add a client span:
@@ -1662,7 +1662,7 @@ If those are not set, we try to retrieve the host name from the network interfac
By default, if you add spring-cloud-starter-zipkin as a dependency to your project, when the span is closed, it is sent to Zipkin over HTTP.
The communication is asynchronous.
You can configure the URL by setting the spring.zipkin.baseUrl property, as follows:
-spring.zipkin.baseUrl: http://192.168.99.100:9411/
+spring.zipkin.baseUrl: https://192.168.99.100:9411/If you want to find Zipkin through service discovery, you can pass the Zipkin’s service ID inside the URL, as shown in the following example for zipkinserver service ID:spring.zipkin.baseUrl: http://zipkinserver/To disable this feature just set spring.zipkin.discoveryClientEnabled to `false.
@@ -1705,13 +1705,13 @@ object, you will have to create a bean of zipkin2.reporter.Sender
-If for some reason you need to create the deprecated Stream Zipkin server, see the Dalston Documentation.
+If for some reason you need to create the deprecated Stream Zipkin server, see the Dalston Documentation.IntegrationsOpenTracing
-Spring Cloud Sleuth is compatible with OpenTracing.
+Spring Cloud Sleuth is compatible with OpenTracing.
If you have OpenTracing on the classpath, we automatically register the OpenTracing Tracer bean.
If you wish to disable this, set spring.sleuth.opentracing.enabled to false
@@ -1917,7 +1917,7 @@ If you create a WebClient instance with a new
Traverson
-If you use the Traverson library, you can inject a RestTemplate as a bean into your Traverson object.
+If you use the Traverson library, you can inject a RestTemplate as a bean into your Traverson object.
Since RestTemplate is already intercepted, you get full support for tracing in your client. The following pseudo code
shows how to do that:@Autowired RestTemplate restTemplate;
@@ -2092,7 +2092,7 @@ to add the @Role(BeanDefinition.ROLE_INFRASTRUCTURE) on your
Features from this section can be disabled by setting the spring.sleuth.messaging.enabled property with value equal to false.Spring Integration and Spring Cloud Stream
-Spring Cloud Sleuth integrates with Spring Integration.
+Spring Cloud Sleuth integrates with Spring Integration.
It creates spans for publish and subscribe events.
To disable Spring Integration instrumentation, set spring.sleuth.integration.enabled to false.You can provide the spring.sleuth.integration.patterns pattern to explicitly provide the names of channels that you want to include for tracing.
@@ -2147,11 +2147,11 @@ To disable Zuul support, set the spring.sleuth.zuul.enabled p
Check them out at the following links:
-Zipkin for apps presented in the samples to the top. First make
-a request to Service 1 and then check out the trace in Zipkin.
+Zipkin for apps presented in the samples to the top. First make
+a request to Service 1 and then check out the trace in Zipkin.
-Zipkin for Brewery on PWS, its Github Code.
+Zipkin for Brewery on PWS, its Github Code.
Ensure that you’ve picked the lookback period of 7 days. If there are no traces, go to Presenting application
and order some beers. Then check Zipkin for traces.