Sync docs from master to gh-pages

This commit is contained in:
buildmaster
2020-04-06 11:42:02 +00:00
parent 14ff33b496
commit c30147b130
5 changed files with 80 additions and 35 deletions

View File

@@ -705,8 +705,8 @@ In extreme cases, too much baggage can crash the application, due to exceeding t
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java">Span initialSpan = this.tracer.nextSpan().name("span").start();
COUNTRY_CODE.updateValue(initialSpan.context(), "FO");
bar.updateValue(initialSpan.context(), "2");</code></pre>
BUSINESS_PROCESS.updateValue(initialSpan.context(), "ALM");
COUNTRY_CODE.updateValue(initialSpan.context(), "FO");</code></pre>
</div>
</div>
<div class="sect4">
@@ -753,14 +753,13 @@ The span must be in scope.
<div class="listingblock">
<div class="title">The setup</div>
<div class="content">
<pre class="highlightjs highlight"><code class="language-yml hljs" data-lang="yml">Unresolved directive in intro.adoc - include::/opt/jenkins/data/workspace/spring-cloud-jdk11-spring-cloud-sleuth-master-ci/spring-cloud-sleuth-core/src/test/resources/application-baggage.yml[indent=0]</code></pre>
<pre class="highlightjs highlight"><code class="language-yml hljs" data-lang="yml">Unresolved directive in intro.adoc - include::/opt/jenkins/data/workspace/spring-cloud-sleuth-master-ci/spring-cloud-sleuth-core/src/test/resources/application-baggage.yml[indent=0]</code></pre>
</div>
</div>
<div class="listingblock">
<div class="title">The code</div>
<div class="content">
<pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java">Tags.BAGGAGE_FIELD.tag(COUNTRY_CODE, initialSpan);
Tags.BAGGAGE_FIELD.tag(bar, initialSpan);</code></pre>
<pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java">Tags.BAGGAGE_FIELD.tag(BUSINESS_PROCESS, initialSpan);</code></pre>
</div>
</div>
</div>

View File

@@ -174,11 +174,6 @@ Also, you can define your own properties.
<td class="tableblock halign-left valign-top"><p class="tableblock">List of {@link java.util.concurrent.Executor} bean names that should be ignored and not wrapped in a trace representation.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">spring.sleuth.baggage-keys</p></td>
<td class="tableblock halign-left valign-top"></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">List of baggage key names that should be propagated out of process. These keys will be prefixed with <code>baggage</code> before the actual key. This property is set in order to be backward compatible with previous Sleuth versions. @see brave.propagation.ExtraFieldPropagation.FactoryBuilder#addPrefixedFields(String, java.util.Collection)</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">spring.sleuth.circuitbreaker.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">Enable Spring Cloud CircuitBreaker instrumentation.</p></td>

View File

@@ -135,7 +135,11 @@ $(globalSwitch);
</ul>
</li>
<li><a href="#sampling">5. Sampling</a></li>
<li><a href="#baggage">6. Baggage</a></li>
<li><a href="#baggage">6. Baggage</a>
<ul class="sectlevel2">
<li><a href="#java-configuration">6.1. Java configuration</a></li>
</ul>
</li>
<li><a href="#instrumentation">7. Instrumentation</a></li>
<li><a href="#span-lifecycle">8. Span lifecycle</a>
<ul class="sectlevel2">
@@ -679,8 +683,8 @@ In extreme cases, too much baggage can crash the application, due to exceeding t
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java">Span initialSpan = this.tracer.nextSpan().name("span").start();
COUNTRY_CODE.updateValue(initialSpan.context(), "FO");
bar.updateValue(initialSpan.context(), "2");</code></pre>
BUSINESS_PROCESS.updateValue(initialSpan.context(), "ALM");
COUNTRY_CODE.updateValue(initialSpan.context(), "FO");</code></pre>
</div>
</div>
<div class="sect4">
@@ -727,14 +731,13 @@ The span must be in scope.
<div class="listingblock">
<div class="title">The setup</div>
<div class="content">
<pre class="highlightjs highlight"><code class="language-yml hljs" data-lang="yml">Unresolved directive in intro.adoc - include::/opt/jenkins/data/workspace/spring-cloud-jdk11-spring-cloud-sleuth-master-ci/spring-cloud-sleuth-core/src/test/resources/application-baggage.yml[indent=0]</code></pre>
<pre class="highlightjs highlight"><code class="language-yml hljs" data-lang="yml">Unresolved directive in intro.adoc - include::/opt/jenkins/data/workspace/spring-cloud-sleuth-master-ci/spring-cloud-sleuth-core/src/test/resources/application-baggage.yml[indent=0]</code></pre>
</div>
</div>
<div class="listingblock">
<div class="title">The code</div>
<div class="content">
<pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java">Tags.BAGGAGE_FIELD.tag(COUNTRY_CODE, initialSpan);
Tags.BAGGAGE_FIELD.tag(bar, initialSpan);</code></pre>
<pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java">Tags.BAGGAGE_FIELD.tag(BUSINESS_PROCESS, initialSpan);</code></pre>
</div>
</div>
</div>
@@ -1346,10 +1349,24 @@ Doing so forces the current span to be exportable regardless of the sampling dec
<h2 id="baggage"><a class="anchor" href="#baggage"></a><a class="link" href="#baggage">6. Baggage</a></h2>
<div class="sectionbody">
<div class="paragraph">
<p>With the <code>spring.sleuth.baggage-keys</code>, you set keys that get prefixed with <code>baggage-</code> for HTTP calls and <code>baggage_</code> for messaging.
You can also use the <code>spring.sleuth.remote-keys</code> property to pass a list of prefixed keys that are propagated to remote services without any prefix.
You can also use the <code>spring.sleuth.local-keys</code> property to pass a list keys that will be propagated locally but will not be propagated over the wire.
Notice that there&#8217;s no <code>x-</code> in front of the header keys.</p>
<p>Baggage are fields that are propagated with the trace, optionally out of process. You can use
properties to define fields that have no special configuration such as name mapping:</p>
</div>
<div class="ulist">
<ul>
<li>
<p><code>spring.sleuth.remote-keys</code> is a list of header names to accept and propagate to remote services.</p>
</li>
<li>
<p><code>spring.sleuth.local-keys</code> is a list of names to propagate locally</p>
</li>
</ul>
</div>
<div class="paragraph">
<p>No prefixing applies with these keys. What you set is literally what is used.</p>
</div>
<div class="paragraph">
<p>A name set in either of these properties will result in a <code>BaggageField</code> of the same name.</p>
</div>
<div class="paragraph">
<p>In order to automatically set the baggage values to Slf4j&#8217;s MDC, you have to set
@@ -1373,6 +1390,15 @@ Remember that adding entries to MDC can drastically decrease the performance of
<p>If you want to add the baggage entries as tags, to make it possible to search for spans via the baggage entries, you can set the value of
<code>spring.sleuth.propagation.tag.whitelisted-keys</code> with a list of whitelisted baggage keys. To disable the feature you have to pass the <code>spring.sleuth.propagation.tag.enabled=false</code> property.</p>
</div>
<div class="sect2">
<h3 id="java-configuration"><a class="anchor" href="#java-configuration"></a><a class="link" href="#java-configuration">6.1. Java configuration</a></h3>
<div class="paragraph">
<p>If you need to do anything more advanced than above, do not define properties and instead use a
<code>@Bean</code> config for the baggage fields you use.
* <code>SingleBaggageField</code> controls header names for one <code>BaggageField</code>.
* <code>SingleCorrelationField</code> controls the MDC name of one <code>BaggageField</code>, and whether updates flush.</p>
</div>
</div>
</div>
</div>
<div class="sect1">

View File

@@ -605,8 +605,8 @@ In extreme cases, too much baggage can crash the application, due to exceeding t
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java">Span initialSpan = this.tracer.nextSpan().name("span").start();
COUNTRY_CODE.updateValue(initialSpan.context(), "FO");
bar.updateValue(initialSpan.context(), "2");</code></pre>
BUSINESS_PROCESS.updateValue(initialSpan.context(), "ALM");
COUNTRY_CODE.updateValue(initialSpan.context(), "FO");</code></pre>
</div>
</div>
<div class="sect4">
@@ -653,14 +653,13 @@ The span must be in scope.
<div class="listingblock">
<div class="title">The setup</div>
<div class="content">
<pre class="highlightjs highlight"><code class="language-yml hljs" data-lang="yml">Unresolved directive in intro.adoc - include::/opt/jenkins/data/workspace/spring-cloud-jdk11-spring-cloud-sleuth-master-ci/spring-cloud-sleuth-core/src/test/resources/application-baggage.yml[indent=0]</code></pre>
<pre class="highlightjs highlight"><code class="language-yml hljs" data-lang="yml">Unresolved directive in intro.adoc - include::/opt/jenkins/data/workspace/spring-cloud-sleuth-master-ci/spring-cloud-sleuth-core/src/test/resources/application-baggage.yml[indent=0]</code></pre>
</div>
</div>
<div class="listingblock">
<div class="title">The code</div>
<div class="content">
<pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java">Tags.BAGGAGE_FIELD.tag(COUNTRY_CODE, initialSpan);
Tags.BAGGAGE_FIELD.tag(bar, initialSpan);</code></pre>
<pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java">Tags.BAGGAGE_FIELD.tag(BUSINESS_PROCESS, initialSpan);</code></pre>
</div>
</div>
</div>

View File

@@ -135,7 +135,11 @@ $(globalSwitch);
</ul>
</li>
<li><a href="#sampling">5. Sampling</a></li>
<li><a href="#baggage">6. Baggage</a></li>
<li><a href="#baggage">6. Baggage</a>
<ul class="sectlevel2">
<li><a href="#java-configuration">6.1. Java configuration</a></li>
</ul>
</li>
<li><a href="#instrumentation">7. Instrumentation</a></li>
<li><a href="#span-lifecycle">8. Span lifecycle</a>
<ul class="sectlevel2">
@@ -679,8 +683,8 @@ In extreme cases, too much baggage can crash the application, due to exceeding t
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java">Span initialSpan = this.tracer.nextSpan().name("span").start();
COUNTRY_CODE.updateValue(initialSpan.context(), "FO");
bar.updateValue(initialSpan.context(), "2");</code></pre>
BUSINESS_PROCESS.updateValue(initialSpan.context(), "ALM");
COUNTRY_CODE.updateValue(initialSpan.context(), "FO");</code></pre>
</div>
</div>
<div class="sect4">
@@ -727,14 +731,13 @@ The span must be in scope.
<div class="listingblock">
<div class="title">The setup</div>
<div class="content">
<pre class="highlightjs highlight"><code class="language-yml hljs" data-lang="yml">Unresolved directive in intro.adoc - include::/opt/jenkins/data/workspace/spring-cloud-jdk11-spring-cloud-sleuth-master-ci/spring-cloud-sleuth-core/src/test/resources/application-baggage.yml[indent=0]</code></pre>
<pre class="highlightjs highlight"><code class="language-yml hljs" data-lang="yml">Unresolved directive in intro.adoc - include::/opt/jenkins/data/workspace/spring-cloud-sleuth-master-ci/spring-cloud-sleuth-core/src/test/resources/application-baggage.yml[indent=0]</code></pre>
</div>
</div>
<div class="listingblock">
<div class="title">The code</div>
<div class="content">
<pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java">Tags.BAGGAGE_FIELD.tag(COUNTRY_CODE, initialSpan);
Tags.BAGGAGE_FIELD.tag(bar, initialSpan);</code></pre>
<pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java">Tags.BAGGAGE_FIELD.tag(BUSINESS_PROCESS, initialSpan);</code></pre>
</div>
</div>
</div>
@@ -1346,10 +1349,24 @@ Doing so forces the current span to be exportable regardless of the sampling dec
<h2 id="baggage"><a class="anchor" href="#baggage"></a><a class="link" href="#baggage">6. Baggage</a></h2>
<div class="sectionbody">
<div class="paragraph">
<p>With the <code>spring.sleuth.baggage-keys</code>, you set keys that get prefixed with <code>baggage-</code> for HTTP calls and <code>baggage_</code> for messaging.
You can also use the <code>spring.sleuth.remote-keys</code> property to pass a list of prefixed keys that are propagated to remote services without any prefix.
You can also use the <code>spring.sleuth.local-keys</code> property to pass a list keys that will be propagated locally but will not be propagated over the wire.
Notice that there&#8217;s no <code>x-</code> in front of the header keys.</p>
<p>Baggage are fields that are propagated with the trace, optionally out of process. You can use
properties to define fields that have no special configuration such as name mapping:</p>
</div>
<div class="ulist">
<ul>
<li>
<p><code>spring.sleuth.remote-keys</code> is a list of header names to accept and propagate to remote services.</p>
</li>
<li>
<p><code>spring.sleuth.local-keys</code> is a list of names to propagate locally</p>
</li>
</ul>
</div>
<div class="paragraph">
<p>No prefixing applies with these keys. What you set is literally what is used.</p>
</div>
<div class="paragraph">
<p>A name set in either of these properties will result in a <code>BaggageField</code> of the same name.</p>
</div>
<div class="paragraph">
<p>In order to automatically set the baggage values to Slf4j&#8217;s MDC, you have to set
@@ -1373,6 +1390,15 @@ Remember that adding entries to MDC can drastically decrease the performance of
<p>If you want to add the baggage entries as tags, to make it possible to search for spans via the baggage entries, you can set the value of
<code>spring.sleuth.propagation.tag.whitelisted-keys</code> with a list of whitelisted baggage keys. To disable the feature you have to pass the <code>spring.sleuth.propagation.tag.enabled=false</code> property.</p>
</div>
<div class="sect2">
<h3 id="java-configuration"><a class="anchor" href="#java-configuration"></a><a class="link" href="#java-configuration">6.1. Java configuration</a></h3>
<div class="paragraph">
<p>If you need to do anything more advanced than above, do not define properties and instead use a
<code>@Bean</code> config for the baggage fields you use.
* <code>SingleBaggageField</code> controls header names for one <code>BaggageField</code>.
* <code>SingleCorrelationField</code> controls the MDC name of one <code>BaggageField</code>, and whether updates flush.</p>
</div>
</div>
</div>
</div>
<div class="sect1">