You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Deprecates all span transports except spring-cloud-sleuth-zipkin2 (#758)
This deprecates span transports in favor of `spring-cloud-sleuth-zipkin2`
which:
* Supports RabbitMQ and Kafka automatically when adding spring-rabbit or spring-kafka deps
* Supports any io.zipkin.reporter2:zipkin-reporter sender, including Amazon X-Ray
* Defaults to zipkin v2 format, but can be configured to use zipkin v1 format as needed
This lowers the amount of maintenance on the project, as discussed in various issues
See #727
See #711
Copy file name to clipboardExpand all lines: docs/src/main/asciidoc/features.adoc
+5-7
Original file line number
Diff line number
Diff line change
@@ -41,19 +41,17 @@ a baggage element then it will be sent downstream either via HTTP or messaging t
41
41
42
42
* Provides simple metrics of accepted / dropped spans.
43
43
44
-
* If `spring-cloud-sleuth-zipkin` then the app will generate and collect Zipkin-compatible traces.
44
+
* If `spring-cloud-sleuth-zipkin2` then the app will generate and collect Zipkin-compatible traces.
45
45
By default it sends them via HTTP to a Zipkin server on localhost (port 9411).
46
46
Configure the location of the service using `spring.zipkin.baseUrl`.
47
+
- If you depend on `spring-rabbit` or `spring-kafka` your app will send traces to a broker instead of http.
48
+
- Note: `spring-cloud-sleuth-stream` is deprecated and should no longer be used.
47
49
48
-
* 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].
49
-
Your app automatically becomes a producer of tracer messages that are sent over your broker of choice
50
-
(e.g. RabbitMQ, Apache Kafka, Redis).
51
-
52
-
IMPORTANT: If using Zipkin or Stream, configure the percentage of spans exported using `spring.sleuth.sampler.percentage`
50
+
IMPORTANT: If using Zipkin, configure the percentage of spans exported using `spring.sleuth.sampler.percentage`
53
51
(default 0.1, i.e. 10%). *Otherwise you might think that Sleuth is not working cause it's omitting some spans.*
54
52
55
53
NOTE: the SLF4J MDC is always set and logback users will immediately see the trace and span ids in logs per the example
56
54
above. Other logging systems have to configure their own formatter to get the same result. The default is
57
55
`logging.pattern.level` set to `%5p [${spring.zipkin.service.name:${spring.application.name:-}},%X{X-B3-TraceId:-},%X{X-B3-SpanId:-},%X{X-Span-Export:-}]`
58
56
(this is a Spring Boot feature for logback users).
59
-
*This means that if you're not using SLF4J this pattern WILL NOT be automatically applied*.
57
+
*This means that if you're not using SLF4J this pattern WILL NOT be automatically applied*.
Copy file name to clipboardExpand all lines: spring-cloud-sleuth-samples/README.adoc
+2-19
Original file line number
Diff line number
Diff line change
@@ -6,11 +6,7 @@ There are a few samples with slightly different features. You can run all of the
6
6
7
7
* `spring-cloud-sleuth-sample`: vanilla (no zipkin) web app that calls back to itself on various endpoints ("/", "/call", "/async")
8
8
9
-
* `spring-cloud-sleuth-sample-zipkin`: same as vanilla sample but with zipkin (set `sample.zipkin.enabled=true` if you have a collector running)
10
-
11
-
* `spring-cloud-sleuth-sample-stream`: same as vanilla sample, but exports span data to RabbitMQ using Spring Cloud Stream
12
-
13
-
* `spring-cloud-sleuth-sample-stream-zipkin`: a consumer for the span data on RabbitMQ that pushes it into a Zipkin span store, so it can be queried and visualized using the embedded Zipkin UI.
9
+
* `spring-cloud-sleuth-sample-zipkin2`: same as vanilla sample but with zipkin (set `sample.zipkin.enabled=true` if you have a collector running)
14
10
15
11
* `spring-cloud-sleuth-sample-messaging`: a Spring Integration application with two HTTP endpoints ("/" and "/xform")
16
12
@@ -20,7 +16,7 @@ The Ribbon sample makes an interesting demo or playground for learning about zip
20
16
21
17
=== Running samples with Zipkin
22
18
23
-
1. Optionally run the https://github.com/openzipkin/zipkin[Zipkin] Server, e.g. via docker compose (there's a `docker-compose.yml` in https://github.com/spring-cloud/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-zipkin[Spring Cloud Sleuth], or in https://github.com/openzipkin/docker-zipkin[Docker Zipkin]
19
+
1. Optionally run the https://github.com/openzipkin/zipkin[Zipkin] Server, e.g. via docker compose (there's a `docker-compose.yml` in https://github.com/spring-cloud/spring-cloud-sleuth-samples/spring-cloud-sleuth-sample-zipkin2[Spring Cloud Sleuth], or in https://github.com/openzipkin/docker-zipkin[Docker Zipkin]
24
20
7. Run the zipkin sample application (set `sample.zipkin.enabled=false` if you have no Zipkin running). If you are using a VM to run docker you might need to tunnel port 9411 to localhost, or change the `spring.zipkin.baseUrl`.
25
21
8. Hit `http://localhost:3380`, `http://localhost:3380/call`, `http://localhost:3380/async` for some interesting sample traces (the app callas back to itself).
26
22
9. Go to `http://localhost:9411` for Zipkin's UI (if you are using boot2docker the host will be different)
@@ -30,16 +26,3 @@ NOTE: You can see the zipkin spans without the UI (in logs) if you run the sampl
> The fact that the first trace in says "testSleuthMessaging" seems to be a bug in the UI (it has some annotations from that service, but it originates in the "testSleuthRibbon" service).
33
-
34
-
=== Running samples with Zipkin Stream
35
-
36
-
Instead of POSTing trace data directly to a Zipkin server, you can export them over https://raw.githubusercontent.com/spring-cloud/spring-cloud-stream[Spring Cloud Stream].
37
-
38
-
1. Run the RabbitMQ middleware for Zipkin (you can use `docker-compose.yml`).
39
-
2. Build the Zipkin Stream sample with Maven and run it.
40
-
7. Run the `spring-cloud-sleuth-sample-stream` app and interact with it in a browser, just like the vanilla sample. If you are using a VM to run docker you might need to tunnel port 5672 to localhost, or change the `spring.rabbbitmq.host`.
41
-
9. Go to `http://localhost:9411` for Zipkin's UI
42
-
43
-
The UI should look more or less like this:
44
-
45
-
image::{github-raw}/docs/src/main/asciidoc/images/zipkin-traces.png[Zipkin Web Screenshot]
0 commit comments