Class MessagingTracingConfigurationEnhancer
java.lang.Object
org.axonframework.messaging.tracing.configuration.MessagingTracingConfigurationEnhancer
- All Implemented Interfaces:
ConfigurationEnhancer
@Internal
@RegistrationScope("Register decorators once at the root; do not re-invoke in child module registries (the DecoratorDefinitions are copied down and reach module-built components on their own). Re-invoking per nesting level re-registers the decorators and produces duplicate nested spans.")
public final class MessagingTracingConfigurationEnhancer
extends Object
implements ConfigurationEnhancer
ConfigurationEnhancer that wires tracing into axon-messaging components. Discovered automatically via
ServiceLoader, so dropping the axon-messaging module on the classpath is enough to enable messaging tracing.
A component is only decorated when a non-no-op SpanFactory is configured (so component-level tracing imposes
no overhead when disabled) and the corresponding toggle in MessagingTracingSettings is enabled. Per-method
handler spans (for @CommandHandler / @EventHandler / @QueryHandler) are produced by
TracingHandlerEnhancerDefinition, which is contributed via the standard HandlerEnhancerDefinition
ServiceLoader entry shipped with this module -- no additional registration is needed here.
- Since:
- 5.3.0
- Author:
- Mateusz Nowak
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intDecorator order for the messaging tracing decorators -- seeTracingConfigurationOrder.TRACING_DECORATOR_ORDERfor the full ordering rationale. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidenhance(ComponentRegistry registry) intorder()Returns the relative order this enhancer should be invoked in, compared to other instances.
-
Field Details
-
TRACING_DECORATOR_ORDER
public static final int TRACING_DECORATOR_ORDERDecorator order for the messaging tracing decorators -- seeTracingConfigurationOrder.TRACING_DECORATOR_ORDERfor the full ordering rationale.- See Also:
-
-
Constructor Details
-
MessagingTracingConfigurationEnhancer
public MessagingTracingConfigurationEnhancer()
-
-
Method Details
-
enhance
Description copied from interface:ConfigurationEnhancer- Specified by:
enhancein interfaceConfigurationEnhancer- Parameters:
registry- The registry instance to enhance.
-
order
public int order()Description copied from interface:ConfigurationEnhancerReturns the relative order this enhancer should be invoked in, compared to other instances.Use lower (negative) values for enhancers providing sensible defaults, and higher values for enhancers that should be able to override values potentially previously set. Defaults to
0when not set.- Specified by:
orderin interfaceConfigurationEnhancer- Returns:
- The order in which this enhancer should be invoked.
-