Added OpenTracing support; fixes #599

This commit is contained in:
Marcin Grzejszczak
2018-01-21 09:28:34 +01:00
parent 266061f0f7
commit 22d91bac24
9 changed files with 438 additions and 5 deletions

View File

@@ -39,14 +39,14 @@ a baggage element then it will be sent downstream either via HTTP or messaging t
* Provides a way to create / continue spans and add tags and logs via annotations.
* Provides simple metrics of accepted / dropped spans.
* 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.
* Spring Cloud Sleuth is http://opentracing.io/[OpenTracing] compatible
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.*

View File

@@ -931,6 +931,12 @@ on how to create a Stream Zipkin server.
== Integrations
=== OpenTracing
Spring Cloud Sleuth is http://opentracing.io/[OpenTracing] compatible. If you have
OpenTracing on the classpath we will automatically register the OpenTracing
`Tracer` bean. If you wish to disable this just set `spring.sleuth.opentracing.enabled` to `false`
=== Runnable and Callable
If you're wrapping your logic in `Runnable` or `Callable` it's enough to wrap those classes in their Sleuth representative.