Sync docs from 1.3.x to gh-pages
This commit is contained in:
@@ -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 Zuul</h2></div></div></div><p>We’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> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="multi__running_examples.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">12. Metrics </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"> 14. 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 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’s best to make the Zipkin span reporting synchronous.
|
||||
Just define a <code class="literal">Reporter<Span></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<Span> reporter(
|
||||
SpanMetricReporter spanMetricReporter,
|
||||
ZipkinProperties zipkin,
|
||||
Sender sender
|
||||
) {
|
||||
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-keyword">final</span> AsyncReporter<Span> 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<Span>() {
|
||||
<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> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="multi__running_examples.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">12. Metrics </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"> 14. 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
@@ -1718,6 +1718,34 @@ Decorating Spring Integration Executor Channel with <literal>TraceableExecutorSe
|
||||
<simpara>We’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’s best to make the Zipkin span reporting synchronous.
|
||||
Just define a <literal>Reporter<Span></literal> bean as presented below:</simpara>
|
||||
<programlisting language="java" linenumbering="unnumbered">@Configuration
|
||||
class ReporterConfiguration {
|
||||
@Bean
|
||||
public Reporter<Span> reporter(
|
||||
SpanMetricReporter spanMetricReporter,
|
||||
ZipkinProperties zipkin,
|
||||
Sender sender
|
||||
) {
|
||||
final AsyncReporter<Span> reporter = AsyncReporter.builder(sender)
|
||||
.queuedMaxSpans(1000)
|
||||
.messageTimeout(zipkin.getMessageTimeout(), TimeUnit.SECONDS)
|
||||
.metrics(new ReporterMetricsAdapter(spanMetricReporter))
|
||||
.build(zipkin.getEncoder());
|
||||
return new Reporter<Span>() {
|
||||
@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>
|
||||
|
||||
Reference in New Issue
Block a user