From a4a33dec6f6f917a348609a128fb1dd83b05964f Mon Sep 17 00:00:00 2001 From: Adrian Cole Date: Thu, 9 Apr 2020 22:01:45 +0800 Subject: [PATCH] polish --- README.adoc | 23 +++++++++-------------- docs/src/main/asciidoc/README.adoc | 4 ++-- docs/src/main/asciidoc/features.adoc | 6 +++--- 3 files changed, 14 insertions(+), 19 deletions(-) diff --git a/README.adoc b/README.adoc index 751b41f8b..462c8e333 100644 --- a/README.adoc +++ b/README.adoc @@ -18,7 +18,7 @@ image::https://badges.gitter.im/spring-cloud/spring-cloud-sleuth.svg[Gitter, lin == Spring Cloud Sleuth Spring Cloud Sleuth provides Spring Boot auto-configuration for distributed -tracing. Underneath, Spring Cloud Sleuth is a layer over a Tracer library named +tracing. Underneath, Spring Cloud Sleuth is a layer over a tracer library named https://github.com/openzipkin/brave[Brave]. Sleuth configures everything you need to get started. This includes where trace @@ -49,7 +49,7 @@ public class DemoController { ---- If you add that handler to a controller, you can see the calls to `home()` -being traced in the logs as well in Zipkin, if configured. +being traced in the logs as well in https://zipkin.io/[Zipkin], if configured. NOTE: Instead of logging the request in the handler explicitly, you could set `logging.level.org.springframework.web.servlet.DispatcherServlet=DEBUG`. @@ -112,7 +112,7 @@ same way regardless of if the error came from a common instrumented library, such as `RestTemplate`, or your own code annotated with `@NewSpan` or similar. Below, we'll use the word Zipkin to describe the tracing system, and include -Zipkin screenshots. However, most services accepting Zipkin's format[https://zipkin.io/zipkin-api/#/default/post_spans], +Zipkin screenshots. However, most services accepting https://zipkin.io/zipkin-api/#/default/post_spans[Zipkin format] have similar base features. Sleuth can also be configured to send data in other formats, something detailed later. @@ -200,17 +200,16 @@ To do so, you have to do the following (for readability, we pass the dependencie *Logback Setup* -Consider the following example of a Logback configuration file (named https://github.com/spring-cloud-samples/sleuth-documentation-apps/blob/master/service1/src/main/resources/logback-spring.xml[logback-spring.xml]). +Consider the following example of a Logback configuration file (logback-spring.xml). [source,xml] ----- - ​ - ​ + - ​ + ${LOG_FILE} @@ -240,7 +239,6 @@ Consider the following example of a Logback configuration file (named https://gi utf8 - ​ ${LOG_FILE}.json @@ -256,13 +254,11 @@ Consider the following example of a Logback configuration file (named https://gi { + "timestamp": "@timestamp", "severity": "%level", "service": "${springAppName:-}", - "trace": "%X{X-B3-TraceId:-}", - "span": "%X{X-B3-SpanId:-}", - "parent": "%X{X-B3-ParentSpanId:-}", - "exportable": "%X{X-Span-Export:-}", - "baggage": "%X{key:-}", + "trace": "%X{traceId:-}", + "span": "%X{spanId:-}", "pid": "${PID:-}", "thread": "%thread", "class": "%logger{40}", @@ -273,7 +269,6 @@ Consider the following example of a Logback configuration file (named https://gi - ​ diff --git a/docs/src/main/asciidoc/README.adoc b/docs/src/main/asciidoc/README.adoc index be0104722..b5c47cea1 100644 --- a/docs/src/main/asciidoc/README.adoc +++ b/docs/src/main/asciidoc/README.adoc @@ -12,7 +12,7 @@ image::https://badges.gitter.im/spring-cloud/spring-cloud-sleuth.svg[Gitter, lin == Spring Cloud Sleuth Spring Cloud Sleuth provides Spring Boot auto-configuration for distributed -tracing. Underneath, Spring Cloud Sleuth is a layer over a Tracer library named +tracing. Underneath, Spring Cloud Sleuth is a layer over a tracer library named https://github.com/openzipkin/brave[Brave]. Sleuth configures everything you need to get started. This includes where trace @@ -43,7 +43,7 @@ public class DemoController { ---- If you add that handler to a controller, you can see the calls to `home()` -being traced in the logs as well in Zipkin, if configured. +being traced in the logs as well in https://zipkin.io/[Zipkin], if configured. NOTE: Instead of logging the request in the handler explicitly, you could set `logging.level.org.springframework.web.servlet.DispatcherServlet=DEBUG`. diff --git a/docs/src/main/asciidoc/features.adoc b/docs/src/main/asciidoc/features.adoc index 77f7ef037..87f2a202d 100644 --- a/docs/src/main/asciidoc/features.adoc +++ b/docs/src/main/asciidoc/features.adoc @@ -9,7 +9,7 @@ same way regardless of if the error came from a common instrumented library, such as `RestTemplate`, or your own code annotated with `@NewSpan` or similar. Below, we'll use the word Zipkin to describe the tracing system, and include -Zipkin screenshots. However, most services accepting Zipkin's format[https://zipkin.io/zipkin-api/#/default/post_spans], +Zipkin screenshots. However, most services accepting https://zipkin.io/zipkin-api/#/default/post_spans[Zipkin format] have similar base features. Sleuth can also be configured to send data in other formats, something detailed later. @@ -97,11 +97,11 @@ To do so, you have to do the following (for readability, we pass the dependencie *Logback Setup* -Consider the following example of a Logback configuration file (named https://raw.githubusercontent.com/spring-cloud/spring-cloud-sleuth/{branch}/docs/src/main/asciidoc/logback-spring.xml[logback-spring.xml]). +Consider the following example of a Logback configuration file (logback-spring.xml). [source,xml] ----- -include::https://raw.githubusercontent.com/spring-cloud/spring-cloud-sleuth/{branch}/docs/src/main/asciidoc/logback-spring.xml[] +include::{project-root}/docs/src/main/asciidoc/logback-spring.xml[] ----- That Logback configuration file: