Sync docs from 1.3.x to gh-pages

This commit is contained in:
buildmaster
2018-03-07 13:45:10 +00:00
parent e4c0281a25
commit 8d90f52a80
4 changed files with 78 additions and 4 deletions

View File

@@ -159,4 +159,27 @@ subscribe events. To disable Spring Integration instrumentation, set <code class
provide the names of channels that you want to include for tracing. By default all channels
are included.</p><div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Important]" src="images/important.png"></td><th align="left">Important</th></tr><tr><td align="left" valign="top"><p>When using the <code class="literal">Executor</code> to build a Spring Integration <code class="literal">IntegrationFlow</code> remember to use the <span class="strong"><strong>untraced</strong></span> version of the <code class="literal">Executor</code>.
Decorating Spring Integration Executor Channel with <code class="literal">TraceableExecutorService</code> will cause the spans to be improperly closed.</p></td></tr></table></div></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="_zuul" href="#_zuul"></a>13.9&nbsp;Zuul</h2></div></div></div><p>We&#8217;re registering Zuul filters to propagate the tracing information (the request header is enriched with tracing data).
To disable Zuul support set the <code class="literal">spring.sleuth.zuul.enabled</code> property to <code class="literal">false</code>.</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="multi__metrics.html">Prev</a>&nbsp;</td><td width="20%" align="center">&nbsp;</td><td width="40%" align="right">&nbsp;<a accesskey="n" href="multi__running_examples.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">12.&nbsp;Metrics&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="multi_spring-cloud-sleuth.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;14.&nbsp;Running examples</td></tr></table></div></body></html>
To disable Zuul support set the <code class="literal">spring.sleuth.zuul.enabled</code> property to <code class="literal">false</code>.</p></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="_spring_cloud_function" href="#_spring_cloud_function"></a>13.10&nbsp;Spring Cloud Function</h2></div></div></div><p>Sleuth works out of the box with Spring Cloud Function. Since functions
might be short living, it&#8217;s best to make the Zipkin span reporting synchronous.
Just define a <code class="literal">Reporter&lt;Span&gt;</code> bean as presented below:</p><pre class="programlisting"><em><span class="hl-annotation" style="color: gray">@Configuration</span></em>
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-keyword">class</span> ReporterConfiguration {
<em><span class="hl-annotation" style="color: gray">@Bean</span></em>
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-keyword">public</span> Reporter&lt;Span&gt; reporter(
SpanMetricReporter spanMetricReporter,
ZipkinProperties zipkin,
Sender sender
) {
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-keyword">final</span> AsyncReporter&lt;Span&gt; reporter = AsyncReporter.builder(sender)
.queuedMaxSpans(<span class="hl-number">1000</span>)
.messageTimeout(zipkin.getMessageTimeout(), TimeUnit.SECONDS)
.metrics(<span xmlns:d="http://docbook.org/ns/docbook" class="hl-keyword">new</span> ReporterMetricsAdapter(spanMetricReporter))
.build(zipkin.getEncoder());
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-keyword">return</span> <span xmlns:d="http://docbook.org/ns/docbook" class="hl-keyword">new</span> Reporter&lt;Span&gt;() {
<em><span class="hl-annotation" style="color: gray">@Override</span></em> <span xmlns:d="http://docbook.org/ns/docbook" class="hl-keyword">public</span> <span xmlns:d="http://docbook.org/ns/docbook" class="hl-keyword">void</span> report(Span span) {
reporter.report(span);
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-comment">// make the reporter synchronous</span>
reporter.flush();
}
};
}
}</pre></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="multi__metrics.html">Prev</a>&nbsp;</td><td width="20%" align="center">&nbsp;</td><td width="40%" align="right">&nbsp;<a accesskey="n" href="multi__running_examples.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">12.&nbsp;Metrics&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="multi_spring-cloud-sleuth.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;14.&nbsp;Running examples</td></tr></table></div></body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1718,6 +1718,34 @@ Decorating Spring Integration Executor Channel with <literal>TraceableExecutorSe
<simpara>We&#8217;re registering Zuul filters to propagate the tracing information (the request header is enriched with tracing data).
To disable Zuul support set the <literal>spring.sleuth.zuul.enabled</literal> property to <literal>false</literal>.</simpara>
</section>
<section xml:id="_spring_cloud_function">
<title>Spring Cloud Function</title>
<simpara>Sleuth works out of the box with Spring Cloud Function. Since functions
might be short living, it&#8217;s best to make the Zipkin span reporting synchronous.
Just define a <literal>Reporter&lt;Span&gt;</literal> bean as presented below:</simpara>
<programlisting language="java" linenumbering="unnumbered">@Configuration
class ReporterConfiguration {
@Bean
public Reporter&lt;Span&gt; reporter(
SpanMetricReporter spanMetricReporter,
ZipkinProperties zipkin,
Sender sender
) {
final AsyncReporter&lt;Span&gt; reporter = AsyncReporter.builder(sender)
.queuedMaxSpans(1000)
.messageTimeout(zipkin.getMessageTimeout(), TimeUnit.SECONDS)
.metrics(new ReporterMetricsAdapter(spanMetricReporter))
.build(zipkin.getEncoder());
return new Reporter&lt;Span&gt;() {
@Override public void report(Span span) {
reporter.report(span);
// make the reporter synchronous
reporter.flush();
}
};
}
}</programlisting>
</section>
</chapter>
<chapter xml:id="_running_examples">
<title>Running examples</title>