From 322f6fa80d7588310bbd6b849bd41d26e514b4b4 Mon Sep 17 00:00:00 2001 From: Marcin Grzejszczak Date: Fri, 15 Jul 2016 09:03:04 +0200 Subject: [PATCH] Sync docs from master to gh-pages --- spring-cloud-sleuth.html | 61 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 59 insertions(+), 2 deletions(-) diff --git a/spring-cloud-sleuth.html b/spring-cloud-sleuth.html index 05bb6840e..0026a83db 100644 --- a/spring-cloud-sleuth.html +++ b/spring-cloud-sleuth.html @@ -430,6 +430,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
  • Terminology
  • Purpose
  • Adding to the project
  • +
  • Additional resources
  • Features
  • Sampling
  • Instrumentation
  • @@ -1164,6 +1165,27 @@ public class ZipkinStreamServerApplication {
    +

    Additional resources

    +
    +
    +

    Adrian Cole giving an introduction to distributed tracing with Zipkin

    +
    +
    +
    + +
    +
    +
    +

    Marcin Grzejszczak talking about Spring Cloud Sleuth and Zipkin

    +
    +
    +
    + +
    +
    +
    +
    +

    Features

    @@ -1567,7 +1589,7 @@ artificial like:

    • -

      http:path when received an http request on a given path

      +

      controller-method-name when received by a Controller with a method name conrollerMethodName

    • async for asynchronous operations done via wrapped Callable and Runnable.

      @@ -2048,6 +2070,17 @@ of regular expressions in the spring.sleuth.rxjava.schedulers.ignoredthrea
    +

    HandlerInterceptor

    +
    +

    Since we want the span names to be precise we’re using a TraceHandlerInterceptor that either wraps an + existing HandlerInterceptor or is added directly to the list of existing HandlerInterceptors. The + TraceHandlerInterceptor adds a special request attribute to the given HttpServletRequest. If the + the TraceFilter doesn’t see this attribute set it will create a "fallback" span which is an additional + span created on the server side so that the trace is presented properly in the UI. Seeing that most likely + signifies that there is a missing instrumentation. In that case please file an issue in Spring Cloud Sleuth.

    +
    +
    +

    Async Servlet support

    If your controller returns a Callable or a WebAsyncTask Spring Cloud Sleuth will continue the existing span instead of creating a new one.

    @@ -2063,6 +2096,19 @@ of regular expressions in the spring.sleuth.rxjava.schedulers.ignoredthrea call is made a new Span is created. It gets closed upon receiving the response. In order to block the synchronous RestTemplate features just set spring.sleuth.web.client.enabled to false.

    +
    + + + + + +
    +
    Important
    +
    +You have to register RestTemplate as a bean so that the interceptors will get injected. +If you create a RestTemplate instance with a new keyword then the instrumentation WILL NOT work. +
    +

    Asynchronous Rest Template

    @@ -2164,6 +2210,17 @@ are creating Spans each time a new task is submitted, invoked or scheduled.

    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.

    +
    +

    Spring Cloud Sleuth up till version 1.0.4 is sending invalid tracing headers when using messaging. Those headers are actually +the same as the ones sent in HTTP (they contain a -) in its name. For the sake of +backwards compatibility in 1.0.4 we’ve started sending both valid and invalid headers. Please upgrade to 1.0.4 because +in Spring Cloud Sleuth 1.1 we will remove the support for the deprecated headers.

    +
    +
    +

    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 +are included.

    +

    Zuul

    @@ -2195,7 +2252,7 @@ To disable Zuul support set the spring.sleuth.zuul.enabled property