Sync docs from 2.2.x to gh-pages

This commit is contained in:
buildmaster
2020-05-16 06:03:31 +00:00
parent e69c538ba9
commit 2f6ef2a389
3 changed files with 23 additions and 19 deletions

View File

@@ -297,7 +297,7 @@ Also, you can define your own properties.
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">spring.sleuth.propagation.tag.enabled</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">true</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Enables a {@link TagPropagationFinishedSpanHandler} that adds extra propagated fields to span tags.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Enables a {@link TagPropagationSpanHandler} that adds extra propagated fields to span tags.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">spring.sleuth.propagation.tag.whitelisted-keys</p></td>

View File

@@ -2735,23 +2735,24 @@ To achieve that, you can pass the following property to your application to over
<h3 id="customization-of-reported-spans"><a class="anchor" href="#customization-of-reported-spans"></a><a class="link" href="#customization-of-reported-spans">12.7. Customization of Reported Spans</a></h3>
<div class="paragraph">
<p>Before reporting spans (for example, to Zipkin) you may want to modify that span in some way.
You can do so by using the <code>FinishedSpanHandler</code> interface.</p>
You can do so by implementing a <code>SpanHandler</code>.</p>
</div>
<div class="paragraph">
<p>In Sleuth, we generate spans with a fixed name.
Some users want to modify the name depending on values of tags.
You can implement the <code>FinishedSpanHandler</code> interface to alter that name.</p>
You can implement the <code>SpanHandler</code> interface to alter that name.</p>
</div>
<div class="paragraph">
<p>The following example shows how to register two beans that implement <code>FinishedSpanHandler</code>:</p>
<p>The following example shows how to register two beans that implement <code>SpanHandler</code>:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java">@Bean
FinishedSpanHandler handlerOne() {
return new FinishedSpanHandler() {
SpanHandler handlerOne() {
return new SpanHandler() {
@Override
public boolean handle(TraceContext traceContext, MutableSpan span) {
public boolean end(TraceContext traceContext, MutableSpan span,
Cause cause) {
span.name("foo");
return true; // keep this span
}
@@ -2759,10 +2760,11 @@ FinishedSpanHandler handlerOne() {
}
@Bean
FinishedSpanHandler handlerTwo() {
return new FinishedSpanHandler() {
SpanHandler handlerTwo() {
return new SpanHandler() {
@Override
public boolean handle(TraceContext traceContext, MutableSpan span) {
public boolean end(TraceContext traceContext, MutableSpan span,
Cause cause) {
span.name(span.name() + " bar");
return true; // keep this span
}

View File

@@ -2735,23 +2735,24 @@ To achieve that, you can pass the following property to your application to over
<h3 id="customization-of-reported-spans"><a class="anchor" href="#customization-of-reported-spans"></a><a class="link" href="#customization-of-reported-spans">12.7. Customization of Reported Spans</a></h3>
<div class="paragraph">
<p>Before reporting spans (for example, to Zipkin) you may want to modify that span in some way.
You can do so by using the <code>FinishedSpanHandler</code> interface.</p>
You can do so by implementing a <code>SpanHandler</code>.</p>
</div>
<div class="paragraph">
<p>In Sleuth, we generate spans with a fixed name.
Some users want to modify the name depending on values of tags.
You can implement the <code>FinishedSpanHandler</code> interface to alter that name.</p>
You can implement the <code>SpanHandler</code> interface to alter that name.</p>
</div>
<div class="paragraph">
<p>The following example shows how to register two beans that implement <code>FinishedSpanHandler</code>:</p>
<p>The following example shows how to register two beans that implement <code>SpanHandler</code>:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java">@Bean
FinishedSpanHandler handlerOne() {
return new FinishedSpanHandler() {
SpanHandler handlerOne() {
return new SpanHandler() {
@Override
public boolean handle(TraceContext traceContext, MutableSpan span) {
public boolean end(TraceContext traceContext, MutableSpan span,
Cause cause) {
span.name("foo");
return true; // keep this span
}
@@ -2759,10 +2760,11 @@ FinishedSpanHandler handlerOne() {
}
@Bean
FinishedSpanHandler handlerTwo() {
return new FinishedSpanHandler() {
SpanHandler handlerTwo() {
return new SpanHandler() {
@Override
public boolean handle(TraceContext traceContext, MutableSpan span) {
public boolean end(TraceContext traceContext, MutableSpan span,
Cause cause) {
span.name(span.name() + " bar");
return true; // keep this span
}