diff --git a/spring-cloud-sleuth.html b/spring-cloud-sleuth.html index 873044348..d10658333 100644 --- a/spring-cloud-sleuth.html +++ b/spring-cloud-sleuth.html @@ -874,7 +874,7 @@ one that it continues.

detach - the span doesn’t get stopped or closed. It only gets removed from the current thread.

  • -

    join - you can create a new span and set an explicit parent to it

    +

    create with explicit parent - you can create a new span and set an explicit parent to it

  • @@ -887,7 +887,7 @@ one that it continues.

    // Start a span. If there was a span present in this thread it will become
     // the `newSpan`'s parent.
    -Span newSpan = this.tracer.startTrace("calculateTax");
    +Span newSpan = this.tracer.createSpan("calculateTax");
     try {
     	// ...
     	// You can tag a span
    @@ -984,18 +984,18 @@ Always clean after you create a span! Don’t forget to detach a span if som
     
    -

    Joining spans

    +

    Creating spans with an explicit parent

    There is a possibility that you want to start a new span and provide an explicit parent of that span. Let’s assume that the parent of a span is in one thread and you want to start a new span in another thread. The -joinTrace method of the Tracer interface is the method you are looking for.

    +startSpan method of the Tracer interface is the method you are looking for.

    // let's assume that we're in a thread Y and we've received
     // the `initialSpan` from thread X. `initialSpan` will be the parent
     // of the `joinedSpan`
    -Span joinedSpan = this.tracer.joinTrace("calculateCommission", initialSpan);
    +Span joinedSpan = this.tracer.createSpan("calculateCommission", initialSpan);
     try {
     	// ...
     	// You can tag a span
    @@ -1018,7 +1018,7 @@ try {
     
    Important
    -After having joined the span remember to close it. Otherwise you will see a lot of warnings in your logs +After having created such a span remember to close it. Otherwise you will see a lot of warnings in your logs related to the fact that you have a span present in the current thread other than the one you’re trying to close. What’s worse your spans won’t get closed properly thus will not get collected to Zipkin. @@ -1253,7 +1253,7 @@ the number of dropped spans will get increased.