From 3224cc6b38d220e782ef599998968ce3d773d973 Mon Sep 17 00:00:00 2001 From: Marcin Grzejszczak Date: Thu, 15 Feb 2018 12:31:11 +0100 Subject: [PATCH] Updated docs about forcing means of sending spans to zipkin; fixes gh-862 --- README.adoc | 2 +- docs/src/main/asciidoc/features.adoc | 2 +- .../main/asciidoc/spring-cloud-sleuth.adoc | 20 +++++++++++++++++++ 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/README.adoc b/README.adoc index 3fb9dba36..4fd415f45 100644 --- a/README.adoc +++ b/README.adoc @@ -553,7 +553,7 @@ 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-zipkin` then the app will generate and collect Zipkin-compatible traces. +* If `spring-cloud-sleuth-zipkin` is on the classpath 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. diff --git a/docs/src/main/asciidoc/features.adoc b/docs/src/main/asciidoc/features.adoc index b5733768d..a272f16d6 100644 --- a/docs/src/main/asciidoc/features.adoc +++ b/docs/src/main/asciidoc/features.adoc @@ -41,7 +41,7 @@ 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-zipkin` then the app will generate and collect Zipkin-compatible traces. +* If `spring-cloud-sleuth-zipkin` is on the classpath 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. diff --git a/docs/src/main/asciidoc/spring-cloud-sleuth.adoc b/docs/src/main/asciidoc/spring-cloud-sleuth.adoc index cdab1ffda..cd2b06b08 100644 --- a/docs/src/main/asciidoc/spring-cloud-sleuth.adoc +++ b/docs/src/main/asciidoc/spring-cloud-sleuth.adoc @@ -502,6 +502,11 @@ spring.zipkin.locator.discovery.enabled: true == Sending spans to Zipkin +IMPORTANT: `spring-cloud-sleuth-stream` is deprecated and should no longer be used. +If `spring-cloud-sleuth-zipkin` is on the classpath 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). If you depend +on `spring-rabbit` or `spring-kafka` your app will send traces to a broker instead of http. + By default if you add `spring-cloud-starter-zipkin` as a dependency to your project, when the span is closed, it will be sent to Zipkin over HTTP. The communication is asynchronous. You can configure the URL by setting the `spring.zipkin.baseUrl` @@ -520,6 +525,16 @@ Zipkin's service id inside the URL (example for `zipkinserver` service id) spring.zipkin.baseUrl: http://zipkinserver/ ---- +If you have web, rabbit or kafka together on the classpath, you might need +to pick the means by which you would like to send spans to zipkin. To do that +just set either `web`, `rabbit` or `kafka` to the `spring.zipkin.sender.type` property. +Example for `web`: + +[source,yaml] +---- +spring.zipkin.sender.type: web +---- + == Span Data as Messages You can accumulate and send span data over @@ -534,6 +549,11 @@ is called `sleuth`. === Zipkin Consumer +IMPORTANT: `spring-cloud-sleuth-zipkin-stream` is deprecated and should no longer be used. +Please use the OpenZipkin's Zipkin server and set the environment variables +as presented https://github.com/openzipkin/zipkin/tree/release-2.4.6/zipkin-collector/rabbitmq[here for rabbit (Zipkin 2.4.6)] +or https://github.com/openzipkin/zipkin/tree/release-2.4.6/zipkin-autoconfigure/collector-kafka10[here for kafka (Zipkin 2.4.6)] + There is a special convenience annotation for setting up a message consumer for the Span data and pushing it into a Zipkin `SpanStore`. This application