Sync docs from master to gh-pages

This commit is contained in:
buildmaster
2018-04-04 15:13:21 +00:00
parent b611a9b24d
commit 826f446d45
3 changed files with 57 additions and 2 deletions

View File

@@ -1502,6 +1502,27 @@ that you can set up the load balancing configuration e.g. via Ribbon.</simpara>
To do so, set <literal>web</literal>, <literal>rabbit</literal>, or <literal>kafka</literal> to the <literal>spring.zipkin.sender.type</literal> property.
The following example shows setting the sender type for <literal>web</literal>:</simpara>
<programlisting language="yaml" linenumbering="unnumbered">spring.zipkin.sender.type: web</programlisting>
<simpara>To customize the <literal>RestTemplate</literal> that sends spans to Zipkin via HTTP, you can register
the <literal>ZipkinRestTemplateCustomizer</literal> bean.</simpara>
<programlisting language="java" linenumbering="unnumbered">@Configuration
class MyConfig {
@Bean ZipkinRestTemplateCustomizer myCustomizer() {
return new ZipkinRestTemplateCustomizer() {
@Override
void customize(RestTemplate restTemplate) {
// customize the RestTemplate
}
};
}
}</programlisting>
<simpara>If, however, you would like to control the full process of creating the <literal>RestTemplate</literal>
object, you will have to create a bean of <literal>zipkin2.reporter.Sender</literal> type.</simpara>
<programlisting language="java" linenumbering="unnumbered"> @Bean Sender myRestTemplateSender(ZipkinProperties zipkin,
ZipkinRestTemplateCustomizer zipkinRestTemplateCustomizer) {
RestTemplate restTemplate = mySuperCustomRestTemplate();
zipkinRestTemplateCustomizer.customize(restTemplate);
return new RestTemplateSender(restTemplate, zipkin.getBaseUrl(), zipkin.getEncoder());
}</programlisting>
</chapter>
<chapter xml:id="_zipkin_stream_span_consumer">
<title>Zipkin Stream Span Consumer</title>