Adds MessageSpanCustomizer to customize message spans
fixes gh-1772
This commit is contained in:
@@ -6,6 +6,11 @@
|
||||
|spring.sleuth.async.enabled | true | Enable instrumenting async related components so that the tracing information is passed between threads.
|
||||
|spring.sleuth.async.ignored-beans | | List of {@link java.util.concurrent.Executor} bean names that should be ignored and not wrapped in a trace representation.
|
||||
|spring.sleuth.baggage-keys | | List of baggage key names that should be propagated out of process. These keys will be prefixed with `baggage` before the actual key. This property is set in order to be backward compatible with previous Sleuth versions. @see brave.propagation.ExtraFieldPropagation.FactoryBuilder#addPrefixedFields(String, java.util.Collection)
|
||||
|spring.sleuth.baggage.correlation-enabled | true | Adds a {@link CorrelationScopeDecorator} to put baggage values into the correlation context.
|
||||
|spring.sleuth.baggage.correlation-fields | | A list of {@link BaggageField#name() fields} to add to correlation (MDC) context. @see CorrelationScopeConfig.SingleCorrelationField#create(BaggageField)
|
||||
|spring.sleuth.baggage.local-fields | | Same as {@link #remoteFields} except that this field is not propagated to remote services. @see BaggagePropagationConfig.SingleBaggageField#local(BaggageField)
|
||||
|spring.sleuth.baggage.remote-fields | | List of fields that are referenced the same in-process as it is on the wire. For example, the field "x-vcap-request-id" would be set as-is including the prefix. @see BaggagePropagationConfig.SingleBaggageField#remote(BaggageField) @see BaggagePropagationConfig.SingleBaggageField.Builder#addKeyName(String)
|
||||
|spring.sleuth.baggage.tag-fields | | A list of {@link BaggageField#name() fields} to tag into the span. @see Tags#BAGGAGE_FIELD
|
||||
|spring.sleuth.circuitbreaker.enabled | true | Enable Spring Cloud CircuitBreaker instrumentation.
|
||||
|spring.sleuth.enabled | true |
|
||||
|spring.sleuth.feign.enabled | true | Enable span information propagation when using Feign.
|
||||
|
||||
@@ -946,6 +946,18 @@ include::{project-root}/spring-cloud-sleuth-core/src/test/java/org/springframewo
|
||||
|
||||
For more, see https://github.com/openzipkin/brave/tree/master/instrumentation/messaging#sampling-policy
|
||||
|
||||
==== Customizing messaging spans
|
||||
|
||||
In order to change the default span names and tags, just register a bean of type `MessageSpanCustomizer`. You can also
|
||||
override the existing `DefaultMessageSpanCustomizer` to extend the existing behaviour.
|
||||
|
||||
[source,java]
|
||||
----
|
||||
@Component
|
||||
include::{project-root}/spring-cloud-sleuth-core/src/test/java/org/springframework/cloud/sleuth/instrument/messaging/TracingChannelInterceptorTest.java[tags=message_span_customizer,indent=2]
|
||||
----
|
||||
|
||||
|
||||
=== RPC
|
||||
|
||||
Sleuth automatically configures the `RpcTracing` bean which serves as a
|
||||
|
||||
Reference in New Issue
Block a user