Class TracingHandlerEnhancerDefinition
java.lang.Object
org.axonframework.messaging.tracing.TracingHandlerEnhancerDefinition
- All Implemented Interfaces:
HandlerEnhancerDefinition
Enhances message handlers with the provided
SpanFactory, wrapping handling of the message in a Span
that is reported to the monitoring tooling.
Since EventSourcingHandlers can be very noisy when loading the aggregate, they can be enabled or disabled
separately through constructor configuration.
- Since:
- 4.6.0
- Author:
- Mitchell Herrijgers
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder class to instantiate aTracingHandlerEnhancerDefinition. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCreates a newTracingHandlerEnhancerDefinitionbased on the builder. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Instantiate a builder to create aTracingHandlerEnhancerDefinition.<T> MessageHandlingMember<T> wrapHandler(MessageHandlingMember<T> original) Enhance the givenoriginalhandler.
-
Constructor Details
-
TracingHandlerEnhancerDefinition
Creates a newTracingHandlerEnhancerDefinitionbased on the builder.- Parameters:
builder- The builder to construct theTracingHandlerEnhancerDefinitionfrom.
-
-
Method Details
-
builder
Instantiate a builder to create aTracingHandlerEnhancerDefinition.The
showEventSourcingHandlersis defaulted tofalse. TheSpanFactoryis a hard requirement and should be provided.- Returns:
- The builder to create a
TracingHandlerEnhancerDefinition.
-
wrapHandler
Description copied from interface:HandlerEnhancerDefinitionEnhance the givenoriginalhandler. Implementations may return the original message handler.- Specified by:
wrapHandlerin interfaceHandlerEnhancerDefinition- Type Parameters:
T- The type of object that will perform the actual handling of the message- Parameters:
original- The original message handler- Returns:
- The enhanced message handler
-