Sync docs from master to gh-pages

This commit is contained in:
buildmaster
2020-04-23 11:44:15 +00:00
parent 8e6e771e11
commit c2a031fca4
4 changed files with 22 additions and 42 deletions

View File

@@ -434,6 +434,7 @@ like so:</p>
<pre class="highlightjs highlight"><code class="language-yml hljs" data-lang="yml">spring:
sleuth:
baggage:
foo: bar
remoteFields:
- country-code
- x-vcap-request-id

View File

@@ -277,6 +277,7 @@ like so:</p>
<pre class="highlightjs highlight"><code class="language-yml hljs" data-lang="yml">spring:
sleuth:
baggage:
foo: bar
remoteFields:
- country-code
- x-vcap-request-id

View File

@@ -403,6 +403,7 @@ like so:</p>
<pre class="highlightjs highlight"><code class="language-yml hljs" data-lang="yml">spring:
sleuth:
baggage:
foo: bar
remoteFields:
- country-code
- x-vcap-request-id
@@ -810,26 +811,17 @@ are some pointers.</p>
<h2 id="sampling"><a class="anchor" href="#sampling"></a><a class="link" href="#sampling">5. Sampling</a></h2>
<div class="sectionbody">
<div class="paragraph">
<p>By default Spring Cloud Sleuth doesn&#8217;t sample spans.
That means that traces appear in logs but not in any remote store.
For testing the default is often enough, and it probably is all you need if you use only the logs (for example, with an ELK aggregator).
If you export span data to Zipkin, there is also an <code>Sampler.ALWAYS_SAMPLE</code> setting that exports everything, <code>RateLimitingSampler</code> setting that samples X transactions per second (defaults to <code>1000</code>) or <code>ProbabilityBasedSampler</code> setting that samples a fixed fraction of spans.</p>
</div>
<div class="admonitionblock note">
<table>
<tr>
<td class="icon">
<i class="fa icon-note" title="Note"></i>
</td>
<td class="content">
The <code>RateLimitingSampler</code> is the default if you use <code>spring-cloud-sleuth-zipkin</code>.
You can configure the rate limit by setting <code>spring.sleuth.sampler.rate</code>.
</td>
</tr>
</table>
<p>Sampling only applies to tracing backends, such as Zipkin. Trace IDs appear in logs regardless of
sample rate. Sampling is a way to prevent overloading the system, by consistently tracing some, but
not all requests.</p>
</div>
<div class="paragraph">
<p>A sampler can be installed by creating a bean definition, as shown in the following example:</p>
<p>The default rate of 10 traces per second is controlled by the <code>spring.sleuth.sampler.rate</code>
property and applies when we know Sleuth is used for reasons besides logging. Use a rate above 100
traces per second with extreme caution as it can overload your tracing system.</p>
</div>
<div class="paragraph">
<p>The sampler can be set by Java Config also, as shown in the following example:</p>
</div>
<div class="listingblock">
<div class="content">
@@ -852,9 +844,6 @@ Doing so forces the current request to be sampled regardless of configuration.
</tr>
</table>
</div>
<div class="paragraph">
<p>In order to use the rate-limited sampler set the <code>spring.sleuth.sampler.rate</code> property to choose an amount of traces to accept on a per-second interval. The minimum number is 0 and the max is 2,147,483,647 (max int).</p>
</div>
</div>
</div>
<div class="sect1">

View File

@@ -403,6 +403,7 @@ like so:</p>
<pre class="highlightjs highlight"><code class="language-yml hljs" data-lang="yml">spring:
sleuth:
baggage:
foo: bar
remoteFields:
- country-code
- x-vcap-request-id
@@ -810,26 +811,17 @@ are some pointers.</p>
<h2 id="sampling"><a class="anchor" href="#sampling"></a><a class="link" href="#sampling">5. Sampling</a></h2>
<div class="sectionbody">
<div class="paragraph">
<p>By default Spring Cloud Sleuth doesn&#8217;t sample spans.
That means that traces appear in logs but not in any remote store.
For testing the default is often enough, and it probably is all you need if you use only the logs (for example, with an ELK aggregator).
If you export span data to Zipkin, there is also an <code>Sampler.ALWAYS_SAMPLE</code> setting that exports everything, <code>RateLimitingSampler</code> setting that samples X transactions per second (defaults to <code>1000</code>) or <code>ProbabilityBasedSampler</code> setting that samples a fixed fraction of spans.</p>
</div>
<div class="admonitionblock note">
<table>
<tr>
<td class="icon">
<i class="fa icon-note" title="Note"></i>
</td>
<td class="content">
The <code>RateLimitingSampler</code> is the default if you use <code>spring-cloud-sleuth-zipkin</code>.
You can configure the rate limit by setting <code>spring.sleuth.sampler.rate</code>.
</td>
</tr>
</table>
<p>Sampling only applies to tracing backends, such as Zipkin. Trace IDs appear in logs regardless of
sample rate. Sampling is a way to prevent overloading the system, by consistently tracing some, but
not all requests.</p>
</div>
<div class="paragraph">
<p>A sampler can be installed by creating a bean definition, as shown in the following example:</p>
<p>The default rate of 10 traces per second is controlled by the <code>spring.sleuth.sampler.rate</code>
property and applies when we know Sleuth is used for reasons besides logging. Use a rate above 100
traces per second with extreme caution as it can overload your tracing system.</p>
</div>
<div class="paragraph">
<p>The sampler can be set by Java Config also, as shown in the following example:</p>
</div>
<div class="listingblock">
<div class="content">
@@ -852,9 +844,6 @@ Doing so forces the current request to be sampled regardless of configuration.
</tr>
</table>
</div>
<div class="paragraph">
<p>In order to use the rate-limited sampler set the <code>spring.sleuth.sampler.rate</code> property to choose an amount of traces to accept on a per-second interval. The minimum number is 0 and the max is 2,147,483,647 (max int).</p>
</div>
</div>
</div>
<div class="sect1">