Sync docs from master to gh-pages
This commit is contained in:
@@ -434,7 +434,7 @@ the Spring BOM</para>
|
||||
</section>
|
||||
<section xml:id="_sleuth_with_zipkin_via_http">
|
||||
<title>Sleuth with Zipkin via HTTP</title>
|
||||
<simpara>If you want both Sleuth and Zipkin just add the <literal>spring-cloud-starter-zipkin2</literal> dependency.</simpara>
|
||||
<simpara>If you want both Sleuth and Zipkin just add the <literal>spring-cloud-starter-zipkin</literal> dependency.</simpara>
|
||||
<formalpara role="primary">
|
||||
<title>Maven</title>
|
||||
<para>
|
||||
@@ -452,7 +452,7 @@ the Spring BOM</para>
|
||||
|
||||
<dependency> <co xml:id="CO3-2"/>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-zipkin2</artifactId>
|
||||
<artifactId>spring-cloud-starter-zipkin</artifactId>
|
||||
</dependency></programlisting>
|
||||
</para>
|
||||
</formalpara>
|
||||
@@ -462,7 +462,7 @@ the Spring BOM</para>
|
||||
the Spring BOM</para>
|
||||
</callout>
|
||||
<callout arearefs="CO3-2">
|
||||
<para>Add the dependency to <literal>spring-cloud-starter-zipkin2</literal></para>
|
||||
<para>Add the dependency to <literal>spring-cloud-starter-zipkin</literal></para>
|
||||
</callout>
|
||||
</calloutlist>
|
||||
<formalpara role="secondary">
|
||||
@@ -475,7 +475,7 @@ the Spring BOM</para>
|
||||
}
|
||||
|
||||
dependencies { <co xml:id="CO4-2"/>
|
||||
compile "org.springframework.cloud:spring-cloud-starter-zipkin2"
|
||||
compile "org.springframework.cloud:spring-cloud-starter-zipkin"
|
||||
}</programlisting>
|
||||
</para>
|
||||
</formalpara>
|
||||
@@ -485,7 +485,7 @@ dependencies { <co xml:id="CO4-2"/>
|
||||
the Spring BOM</para>
|
||||
</callout>
|
||||
<callout arearefs="CO4-2">
|
||||
<para>Add the dependency to <literal>spring-cloud-starter-zipkin2</literal></para>
|
||||
<para>Add the dependency to <literal>spring-cloud-starter-zipkin</literal></para>
|
||||
</callout>
|
||||
</calloutlist>
|
||||
</section>
|
||||
@@ -494,7 +494,7 @@ the Spring BOM</para>
|
||||
<simpara>If you want to use RabbitMQ or Kafka instead of http, add the <literal>spring-rabbit</literal> or <literal>spring-kafka</literal>
|
||||
dependencies. The default destination name is <literal>zipkin</literal>.</simpara>
|
||||
<simpara><emphasis>Note: <literal>spring-cloud-sleuth-stream</literal> is deprecated and incompatible with these destinations</emphasis></simpara>
|
||||
<simpara>If you want Sleuth over RabbitMQ add the <literal>spring-cloud-starter-zipkin2</literal> and <literal>spring-rabbit</literal>
|
||||
<simpara>If you want Sleuth over RabbitMQ add the <literal>spring-cloud-starter-zipkin</literal> and <literal>spring-rabbit</literal>
|
||||
dependencies.</simpara>
|
||||
<formalpara role="primary">
|
||||
<title>Maven</title>
|
||||
@@ -513,7 +513,7 @@ dependencies.</simpara>
|
||||
|
||||
<dependency> <co xml:id="CO5-2"/>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-zipkin2</artifactId>
|
||||
<artifactId>spring-cloud-starter-zipkin</artifactId>
|
||||
</dependency>
|
||||
<dependency> <co xml:id="CO5-3"/>
|
||||
<groupId>org.springframework.amqp</groupId>
|
||||
@@ -527,7 +527,7 @@ dependencies.</simpara>
|
||||
the Spring BOM</para>
|
||||
</callout>
|
||||
<callout arearefs="CO5-2">
|
||||
<para>Add the dependency to <literal>spring-cloud-starter-zipkin2</literal> - that way all dependent dependencies will be downloaded</para>
|
||||
<para>Add the dependency to <literal>spring-cloud-starter-zipkin</literal> - that way all dependent dependencies will be downloaded</para>
|
||||
</callout>
|
||||
<callout arearefs="CO5-3">
|
||||
<para>To automatically configure rabbit, simply add the spring-rabbit dependency</para>
|
||||
@@ -543,7 +543,7 @@ the Spring BOM</para>
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile "org.springframework.cloud:spring-cloud-starter-zipkin2" <co xml:id="CO6-2"/>
|
||||
compile "org.springframework.cloud:spring-cloud-starter-zipkin" <co xml:id="CO6-2"/>
|
||||
compile "org.springframework.amqp:spring-rabbit" <co xml:id="CO6-3"/>
|
||||
}</programlisting>
|
||||
</para>
|
||||
@@ -554,7 +554,7 @@ dependencies {
|
||||
the Spring BOM</para>
|
||||
</callout>
|
||||
<callout arearefs="CO6-2">
|
||||
<para>Add the dependency to <literal>spring-cloud-starter-zipkin2</literal> - that way all dependent dependencies will be downloaded</para>
|
||||
<para>Add the dependency to <literal>spring-cloud-starter-zipkin</literal> - that way all dependent dependencies will be downloaded</para>
|
||||
</callout>
|
||||
<callout arearefs="CO6-3">
|
||||
<para>To automatically configure rabbit, simply add the spring-rabbit dependency</para>
|
||||
@@ -637,7 +637,7 @@ a baggage element then it will be sent downstream either via HTTP or messaging t
|
||||
<simpara>Provides simple metrics of accepted / dropped spans.</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>If <literal>spring-cloud-sleuth-zipkin2</literal> then the app will generate and collect Zipkin-compatible traces.
|
||||
<simpara>If <literal>spring-cloud-sleuth-zipkin</literal> then the app will generate and collect Zipkin-compatible traces.
|
||||
By default it sends them via HTTP to a Zipkin server on localhost (port 9411).
|
||||
Configure the location of the service using <literal>spring.zipkin.baseUrl</literal>.</simpara>
|
||||
<itemizedlist>
|
||||
@@ -1233,20 +1233,7 @@ TraceFilter myTraceFilter(BeanFactory beanFactory, final Tracer tracer) {
|
||||
<simpara>Sometimes you want to create a manual Span that will wrap a call to an external service which is not instrumented.
|
||||
What you can do is to create a span with the <literal>peer.service</literal> tag that will contain a value of the service that you want to call.
|
||||
Below you can see an example of a call to Redis that is wrapped in such a span.</simpara>
|
||||
<programlisting language="java" linenumbering="unnumbered">org.springframework.cloud.sleuth.Span newSpan = tracer.createSpan("redis");
|
||||
try {
|
||||
newSpan.tag("redis.op", "get");
|
||||
newSpan.tag("lc", "redis");
|
||||
newSpan.logEvent(org.springframework.cloud.sleuth.Span.CLIENT_SEND);
|
||||
// call redis service e.g
|
||||
// return (SomeObj) redisTemplate.opsForHash().get("MYHASH", someObjKey);
|
||||
} finally {
|
||||
newSpan.tag("peer.service", "redisService");
|
||||
newSpan.tag("peer.ipv4", "1.2.3.4");
|
||||
newSpan.tag("peer.port", "1234");
|
||||
newSpan.logEvent(org.springframework.cloud.sleuth.Span.CLIENT_RECV);
|
||||
tracer.close(newSpan);
|
||||
}</programlisting>
|
||||
<programlisting language="java" linenumbering="unnumbered">Unresolved directive in spring-cloud-sleuth.adoc - include::../../../..//spring-cloud-sleuth-zipkin/src/test/java/org/springframework/cloud/sleuth/zipkin/HttpZipkinSpanReporterTest.java[tags=service_name,indent=0]</programlisting>
|
||||
<important>
|
||||
<simpara>Remember not to add both <literal>peer.service</literal> tag and the <literal>SA</literal> tag! You have to add only <literal>peer.service</literal>.</simpara>
|
||||
</important>
|
||||
|
||||
Reference in New Issue
Block a user