diff --git a/multi/multi__customizations.html b/multi/multi__customizations.html index 2555d14b8..87176b180 100644 --- a/multi/multi__customizations.html +++ b/multi/multi__customizations.html @@ -57,7 +57,7 @@ You can customize the tags or modify the response headers by registering your ow That is not always the case, though. There are situations in which you want to explicitly provide a different service name for all spans coming from your application. To achieve that, you can pass the following property to your application to override that value (the example is for a service named myService):

spring.zipkin.service.name: myService

12.4 Customization of Reported Spans

Before reporting spans (for example, to Zipkin) you may want to modify that span in some way. -You can do so by using the SpanAdjuster interface.

In Sleuth, we generat spans with a fixed name. +You can do so by using the SpanAdjuster interface.

In Sleuth, we generate spans with a fixed name. Some users want to modify the name depending on values of tags. You can implement the SpanAdjuster interface to alter that name.

The following example shows how to register two beans that implement SpanAdjuster:

@Bean SpanAdjuster adjusterOne() {
 	return span -> span.toBuilder().name("foo").build();
diff --git a/multi/multi__naming_spans.html b/multi/multi__naming_spans.html
index ca170d699..abfa42cf2 100644
--- a/multi/multi__naming_spans.html
+++ b/multi/multi__naming_spans.html
@@ -1,7 +1,7 @@
 
       
    10. Naming spans

10. Naming spans

Picking a span name is not a trivial task. A span name should depict an operation name. -The name should be low cardinality, so it should not include identifiers.

Since there is a lot of instrumentation going on, some span names are artificial:

  • controller-method-name when received by a Controller with a method name of conrollerMethodName
  • async for asynchronous operations done with wrapped Callable and Runnable interfaces.
  • Methods annotated with @Scheduled return the simple name of the class.

Fortunately, for asynchronous processing, you can provide explicit naming.

10.1 @SpanName Annotation

You can name the span explicitly by using the @SpanName annotation, as shown in the followwng example:

@SpanName("calculateTax")
+The name should be low cardinality, so it should not include identifiers.

Since there is a lot of instrumentation going on, some span names are artificial:

  • controller-method-name when received by a Controller with a method name of controllerMethodName
  • async for asynchronous operations done with wrapped Callable and Runnable interfaces.
  • Methods annotated with @Scheduled return the simple name of the class.

Fortunately, for asynchronous processing, you can provide explicit naming.

10.1 @SpanName Annotation

You can name the span explicitly by using the @SpanName annotation, as shown in the following example:

@SpanName("calculateTax")
 class TaxCountingRunnable implements Runnable {
 
 	@Override public void run() {
diff --git a/multi/multi__zipkin_stream_span_consumer.html b/multi/multi__zipkin_stream_span_consumer.html
index aaf132bca..527157b4c 100644
--- a/multi/multi__zipkin_stream_span_consumer.html
+++ b/multi/multi__zipkin_stream_span_consumer.html
@@ -2,5 +2,5 @@
       
    14. Zipkin Stream Span Consumer

14. Zipkin Stream Span Consumer

[Important]Important

We recommend using Zipkin’s native support for message-based span sending. Starting from the Edgware release, the Zipkin Stream server is deprecated. -In the Finchley release, it got removed.

See the Dalston Documentaion +In the Finchley release, it got removed.

See the Dalston Documentation for how to create a Stream Zipkin server.

\ No newline at end of file diff --git a/single/spring-cloud-sleuth.html b/single/spring-cloud-sleuth.html index f594197f2..c0c66948b 100644 --- a/single/spring-cloud-sleuth.html +++ b/single/spring-cloud-sleuth.html @@ -532,7 +532,7 @@ Span newSpan = null; newSpan.finish(); } }
[Important]Important

After creating such a span, you must finish it. Otherwise it is not reported (for example, to Zipkin).

10. Naming spans

Picking a span name is not a trivial task. A span name should depict an operation name. -The name should be low cardinality, so it should not include identifiers.

Since there is a lot of instrumentation going on, some span names are artificial:

  • controller-method-name when received by a Controller with a method name of conrollerMethodName
  • async for asynchronous operations done with wrapped Callable and Runnable interfaces.
  • Methods annotated with @Scheduled return the simple name of the class.

Fortunately, for asynchronous processing, you can provide explicit naming.

10.1 @SpanName Annotation

You can name the span explicitly by using the @SpanName annotation, as shown in the followwng example:

@SpanName("calculateTax")
+The name should be low cardinality, so it should not include identifiers.

Since there is a lot of instrumentation going on, some span names are artificial:

  • controller-method-name when received by a Controller with a method name of controllerMethodName
  • async for asynchronous operations done with wrapped Callable and Runnable interfaces.
  • Methods annotated with @Scheduled return the simple name of the class.

Fortunately, for asynchronous processing, you can provide explicit naming.

10.1 @SpanName Annotation

You can name the span explicitly by using the @SpanName annotation, as shown in the following example:

@SpanName("calculateTax")
 class TaxCountingRunnable implements Runnable {
 
 	@Override public void run() {
@@ -653,7 +653,7 @@ You can customize the tags or modify the response headers by registering your ow
 That is not always the case, though.
 There are situations in which you want to explicitly provide a different service name for all spans coming from your application.
 To achieve that, you can pass the following property to your application to override that value (the example is for a service named myService):

spring.zipkin.service.name: myService

12.4 Customization of Reported Spans

Before reporting spans (for example, to Zipkin) you may want to modify that span in some way. -You can do so by using the SpanAdjuster interface.

In Sleuth, we generat spans with a fixed name. +You can do so by using the SpanAdjuster interface.

In Sleuth, we generate spans with a fixed name. Some users want to modify the name depending on values of tags. You can implement the SpanAdjuster interface to alter that name.

The following example shows how to register two beans that implement SpanAdjuster:

@Bean SpanAdjuster adjusterOne() {
 	return span -> span.toBuilder().name("foo").build();
@@ -691,7 +691,7 @@ object, you will have to create a bean of zipkin2.reporter
 		return myCustomSender(zipkin, restTemplate);
 	}

14. Zipkin Stream Span Consumer

[Important]Important

We recommend using Zipkin’s native support for message-based span sending. Starting from the Edgware release, the Zipkin Stream server is deprecated. -In the Finchley release, it got removed.

See the Dalston Documentaion +In the Finchley release, it got removed.

See the Dalston Documentation for how to create a Stream Zipkin server.

15. Integrations

15.1 OpenTracing

Spring Cloud Sleuth is compatible with OpenTracing. If you have OpenTracing on the classpath, we automatically register the OpenTracing Tracer bean. If you wish to disable this, set spring.sleuth.opentracing.enabled to false

15.2 Runnable and Callable

If you wrap your logic in Runnable or Callable, you can wrap those classes in their Sleuth representative, as shown in the following example for Runnable:

Runnable runnable = new Runnable() {
diff --git a/spring-cloud-sleuth.xml b/spring-cloud-sleuth.xml
index cf274ac98..b949933a8 100644
--- a/spring-cloud-sleuth.xml
+++ b/spring-cloud-sleuth.xml
@@ -1205,7 +1205,7 @@ The name should be low cardinality, so it should not include identifiers.Since there is a lot of instrumentation going on, some span names are artificial:
 
 
-controller-method-name when received by a Controller with a method name of conrollerMethodName
+controller-method-name when received by a Controller with a method name of controllerMethodName
 
 
 async for asynchronous operations done with wrapped Callable and Runnable interfaces.
@@ -1217,7 +1217,7 @@ The name should be low cardinality, so it should not include identifiers.Fortunately, for asynchronous processing, you can provide explicit naming.
 
<literal>@SpanName</literal> Annotation -You can name the span explicitly by using the @SpanName annotation, as shown in the followwng example: +You can name the span explicitly by using the @SpanName annotation, as shown in the following example: @SpanName("calculateTax") class TaxCountingRunnable implements Runnable { @@ -1459,7 +1459,7 @@ To achieve that, you can pass the following property to your application to over Customization of Reported Spans Before reporting spans (for example, to Zipkin) you may want to modify that span in some way. You can do so by using the SpanAdjuster interface. -In Sleuth, we generat spans with a fixed name. +In Sleuth, we generate spans with a fixed name. Some users want to modify the name depending on values of tags. You can implement the SpanAdjuster interface to alter that name. The following example shows how to register two beans that implement SpanAdjuster: @@ -1533,7 +1533,7 @@ object, you will have to create a bean of zipkin2.reporter.Sender -See the Dalston Documentaion +See the Dalston Documentation for how to create a Stream Zipkin server.