diff --git a/reference/html/index.html b/reference/html/index.html index cac3fe45c..647c3979b 100644 --- a/reference/html/index.html +++ b/reference/html/index.html @@ -159,10 +159,11 @@ $(addBlockSwitches);
  • 12.1. Customizers
  • 12.2. HTTP
  • 12.3. TracingFilter
  • -
  • 12.4. RPC
  • -
  • 12.5. Custom service name
  • -
  • 12.6. Customization of Reported Spans
  • -
  • 12.7. Host Locator
  • +
  • 12.4. Messaging
  • +
  • 12.5. RPC
  • +
  • 12.6. Custom service name
  • +
  • 12.7. Customization of Reported Spans
  • +
  • 12.8. Host Locator
  • 13. Sending Spans to Zipkin
  • @@ -178,7 +179,7 @@ $(addBlockSwitches);
  • 15.7. Feign
  • 15.8. gRPC
  • 15.9. Asynchronous Communication
  • -
  • 15.10. Messaging
  • +
  • 15.10. Messaging
  • 15.11. Zuul
  • 15.12. Redis
  • 15.13. Quartz
  • @@ -2600,7 +2601,41 @@ class MyFilter extends GenericFilterBean {
    -

    12.4. RPC

    +

    12.4. Messaging

    +
    +

    Sleuth automatically configures the MessagingTracing bean which serves as a +foundation for Messaging instrumentation such as Kafka or JMS.

    +
    +
    +

    If a customization of producer / consumer sampling of messaging traces is required, +just register a bean of type brave.sampler.SamplerFunction<MessagingRequest> and +name the bean sleuthProducerSampler for producer sampler and sleuthConsumerSampler +for consumer sampler.

    +
    +
    +

    For your convenience the @ProducerSampler and @ConsumerSampler +annotations can be used to inject the proper beans or to reference the bean +names via their static String NAME fields.

    +
    +
    +

    Ex. Here’s a sampler that traces 100 consumer requests per second, except for +the "alerts" channel. Other requests will use a global rate provided by the +Tracing component.

    +
    +
    +
    +
    @Configuration
    +class Config {
    +Unresolved directive in index.adoc - include::/opt/jenkins/data/workspace/spring-cloud-sleuth-master-ci/tests/spring-cloud-sleuth-instrumentation-messaging-tests/src/test/java/org/springframework/cloud/sleuth/instrument/messaging/TraceMessagingAutoConfigurationIntegrationTests.java[tags=custom_messaging_server_sampler,indent=2]
    +}
    +
    +
    +
    +

    For more, see github.com/openzipkin/brave/tree/master/instrumentation/messaging#sampling-policy

    +
    +
    +
    +

    12.5. RPC

    Sleuth automatically configures the RpcTracing bean which serves as a foundation for RPC instrumentation such as gRPC or Dubbo.

    @@ -2641,7 +2676,7 @@ class Config {
    -

    12.5. Custom service name

    +

    12.6. Custom service name

    By default, Sleuth assumes that, when you send a span to Zipkin, you want the span’s service name to be equal to the value of the spring.application.name property. That is not always the case, though. @@ -2655,7 +2690,7 @@ To achieve that, you can pass the following property to your application to over

    -

    12.6. Customization of Reported Spans

    +

    12.7. 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 FinishedSpanHandler interface.

    @@ -2698,7 +2733,7 @@ FinishedSpanHandler handlerTwo() {
    -

    12.7. Host Locator

    +

    12.8. Host Locator

    @@ -3449,7 +3484,7 @@ to add the @Role(BeanDefinition.ROLE_INFRASTRUCTURE) on your
    -

    15.10. Messaging

    +

    15.10. Messaging

    Features from this section can be disabled by setting the spring.sleuth.messaging.enabled property with value equal to false.

    diff --git a/reference/html/spring-cloud-sleuth.html b/reference/html/spring-cloud-sleuth.html index cac3fe45c..763e39fd7 100644 --- a/reference/html/spring-cloud-sleuth.html +++ b/reference/html/spring-cloud-sleuth.html @@ -159,10 +159,11 @@ $(addBlockSwitches);
  • 12.1. Customizers
  • 12.2. HTTP
  • 12.3. TracingFilter
  • -
  • 12.4. RPC
  • -
  • 12.5. Custom service name
  • -
  • 12.6. Customization of Reported Spans
  • -
  • 12.7. Host Locator
  • +
  • 12.4. Messaging
  • +
  • 12.5. RPC
  • +
  • 12.6. Custom service name
  • +
  • 12.7. Customization of Reported Spans
  • +
  • 12.8. Host Locator
  • 13. Sending Spans to Zipkin
  • @@ -178,7 +179,7 @@ $(addBlockSwitches);
  • 15.7. Feign
  • 15.8. gRPC
  • 15.9. Asynchronous Communication
  • -
  • 15.10. Messaging
  • +
  • 15.10. Messaging
  • 15.11. Zuul
  • 15.12. Redis
  • 15.13. Quartz
  • @@ -2600,7 +2601,41 @@ class MyFilter extends GenericFilterBean {
    -

    12.4. RPC

    +

    12.4. Messaging

    +
    +

    Sleuth automatically configures the MessagingTracing bean which serves as a +foundation for Messaging instrumentation such as Kafka or JMS.

    +
    +
    +

    If a customization of producer / consumer sampling of messaging traces is required, +just register a bean of type brave.sampler.SamplerFunction<MessagingRequest> and +name the bean sleuthProducerSampler for producer sampler and sleuthConsumerSampler +for consumer sampler.

    +
    +
    +

    For your convenience the @ProducerSampler and @ConsumerSampler +annotations can be used to inject the proper beans or to reference the bean +names via their static String NAME fields.

    +
    +
    +

    Ex. Here’s a sampler that traces 100 consumer requests per second, except for +the "alerts" channel. Other requests will use a global rate provided by the +Tracing component.

    +
    +
    +
    +
    @Configuration
    +class Config {
    +Unresolved directive in spring-cloud-sleuth.adoc - include::/opt/jenkins/data/workspace/spring-cloud-sleuth-master-ci/tests/spring-cloud-sleuth-instrumentation-messaging-tests/src/test/java/org/springframework/cloud/sleuth/instrument/messaging/TraceMessagingAutoConfigurationIntegrationTests.java[tags=custom_messaging_server_sampler,indent=2]
    +}
    +
    +
    + +
    +
    +

    12.5. RPC

    Sleuth automatically configures the RpcTracing bean which serves as a foundation for RPC instrumentation such as gRPC or Dubbo.

    @@ -2641,7 +2676,7 @@ class Config {
    -

    12.5. Custom service name

    +

    12.6. Custom service name

    By default, Sleuth assumes that, when you send a span to Zipkin, you want the span’s service name to be equal to the value of the spring.application.name property. That is not always the case, though. @@ -2655,7 +2690,7 @@ To achieve that, you can pass the following property to your application to over

    -

    12.6. Customization of Reported Spans

    +

    12.7. 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 FinishedSpanHandler interface.

    @@ -2698,7 +2733,7 @@ FinishedSpanHandler handlerTwo() {
    @@ -3449,7 +3484,7 @@ to add the @Role(BeanDefinition.ROLE_INFRASTRUCTURE) on your
    -

    15.10. Messaging

    +

    15.10. Messaging

    Features from this section can be disabled by setting the spring.sleuth.messaging.enabled property with value equal to false.