Sync docs from master to gh-pages

This commit is contained in:
Marcin Grzejszczak
2017-08-29 10:49:18 +02:00
parent 76e9f6d64d
commit 985ba8b4fa
19 changed files with 425 additions and 419 deletions

View File

@@ -1,13 +1,13 @@
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>10.&nbsp;Span Data as Messages</title><link rel="stylesheet" type="text/css" href="css/manual-multipage.css"><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="spring-cloud-sleuth.html" title="Spring Cloud Sleuth"><link rel="up" href="spring-cloud-sleuth.html" title="Spring Cloud Sleuth"><link rel="prev" href="_sending_spans_to_zipkin.html" title="9.&nbsp;Sending spans to Zipkin"><link rel="next" href="_metrics.html" title="11.&nbsp;Metrics"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">10.&nbsp;Span Data as Messages</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="_sending_spans_to_zipkin.html">Prev</a>&nbsp;</td><th width="60%" align="center">&nbsp;</th><td width="20%" align="right">&nbsp;<a accesskey="n" href="_metrics.html">Next</a></td></tr></table><hr></div><div class="chapter"><div class="titlepage"><div><div><h1 class="title"><a name="_span_data_as_messages" href="#_span_data_as_messages"></a>10.&nbsp;Span Data as Messages</h1></div></div></div><p>You can accumulate and send span data over
<title>11.&nbsp;Span Data as Messages</title><link rel="stylesheet" type="text/css" href="css/manual-multipage.css"><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="spring-cloud-sleuth.html" title="Spring Cloud Sleuth"><link rel="up" href="spring-cloud-sleuth.html" title="Spring Cloud Sleuth"><link rel="prev" href="_sending_spans_to_zipkin.html" title="10.&nbsp;Sending spans to Zipkin"><link rel="next" href="_metrics.html" title="12.&nbsp;Metrics"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">11.&nbsp;Span Data as Messages</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="_sending_spans_to_zipkin.html">Prev</a>&nbsp;</td><th width="60%" align="center">&nbsp;</th><td width="20%" align="right">&nbsp;<a accesskey="n" href="_metrics.html">Next</a></td></tr></table><hr></div><div class="chapter"><div class="titlepage"><div><div><h1 class="title"><a name="_span_data_as_messages" href="#_span_data_as_messages"></a>11.&nbsp;Span Data as Messages</h1></div></div></div><p>You can accumulate and send span data over
<a class="link" href="http://cloud.spring.io/spring-cloud-stream" target="_top">Spring Cloud Stream</a> by
including the <code class="literal">spring-cloud-sleuth-stream</code> jar as a dependency, and
adding a Channel Binder implementation
(e.g. <code class="literal">spring-cloud-starter-stream-rabbit</code> for RabbitMQ or
<code class="literal">spring-cloud-starter-stream-kafka</code> for Kafka). This will
automatically turn your app into a producer of messages with payload
type <code class="literal">Spans</code>.</p><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="_zipkin_consumer" href="#_zipkin_consumer"></a>10.1&nbsp;Zipkin Consumer</h3></div></div></div><p>There is a special convenience annotation for setting up a message consumer
type <code class="literal">Spans</code>.</p><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="_zipkin_consumer" href="#_zipkin_consumer"></a>11.1&nbsp;Zipkin Consumer</h2></div></div></div><p>There is a special convenience annotation for setting up a message consumer
for the Span data and pushing it into a Zipkin <code class="literal">SpanStore</code>. This application</p><pre class="programlisting"><em><span class="hl-annotation" style="color: gray">@SpringBootApplication</span></em>
<em><span class="hl-annotation" style="color: gray">@EnableZipkinStreamServer</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">class</span> Consumer {
@@ -41,7 +41,7 @@ started quickly). For a more robust solution you can add MySQL and
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-attribute"> type</span>: mysql</pre><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left">Note</th></tr><tr><td align="left" valign="top"><p>The <code class="literal">@EnableZipkinStreamServer</code> is also annotated with
<code class="literal">@EnableZipkinServer</code> so the process will also expose the standard
Zipkin server endpoints for collecting spans over HTTP, and for
querying in the Zipkin Web UI.</p></td></tr></table></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="_custom_consumer" href="#_custom_consumer"></a>10.2&nbsp;Custom Consumer</h3></div></div></div><p>A custom consumer can also easily be implemented using
querying in the Zipkin Web UI.</p></td></tr></table></div></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="_custom_consumer" href="#_custom_consumer"></a>11.2&nbsp;Custom Consumer</h2></div></div></div><p>A custom consumer can also easily be implemented using
<code class="literal">spring-cloud-sleuth-stream</code> and binding to the <code class="literal">SleuthSink</code>. Example:</p><pre class="programlisting"><em><span class="hl-annotation" style="color: gray">@EnableBinding(SleuthSink.class)</span></em>
<em><span class="hl-annotation" style="color: gray">@SpringBootApplication(exclude = SleuthStreamAutoConfiguration.class)</span></em>
<em><span class="hl-annotation" style="color: gray">@MessageEndpoint</span></em>
@@ -65,4 +65,4 @@ with name equal to <code class="literal">StreamSpanReporter.POLLER</code>. Here
poller.setTrigger(<span xmlns:d="http://docbook.org/ns/docbook" class="hl-keyword">new</span> PeriodicTrigger(<span class="hl-number">5000L</span>));
<span xmlns:d="http://docbook.org/ns/docbook" class="hl-keyword">return</span> poller;
}
}</pre></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="_sending_spans_to_zipkin.html">Prev</a>&nbsp;</td><td width="20%" align="center">&nbsp;</td><td width="40%" align="right">&nbsp;<a accesskey="n" href="_metrics.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">9.&nbsp;Sending spans to Zipkin&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="spring-cloud-sleuth.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;11.&nbsp;Metrics</td></tr></table></div></body></html>
}</pre></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="_sending_spans_to_zipkin.html">Prev</a>&nbsp;</td><td width="20%" align="center">&nbsp;</td><td width="40%" align="right">&nbsp;<a accesskey="n" href="_metrics.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">10.&nbsp;Sending spans to Zipkin&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="spring-cloud-sleuth.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;12.&nbsp;Metrics</td></tr></table></div></body></html>