public class TracingHandlerEnhancerDefinition extends Object implements HandlerEnhancerDefinition
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.
Modifier and Type | Class and Description |
---|---|
static class |
TracingHandlerEnhancerDefinition.Builder
Builder class to instantiate a
TracingHandlerEnhancerDefinition . |
Modifier | Constructor and Description |
---|---|
protected |
TracingHandlerEnhancerDefinition(TracingHandlerEnhancerDefinition.Builder builder)
Creates a new
TracingHandlerEnhancerDefinition based on the builder. |
Modifier and Type | Method and Description |
---|---|
static TracingHandlerEnhancerDefinition.Builder |
builder()
Instantiate a builder to create a
TracingHandlerEnhancerDefinition . |
<T> MessageHandlingMember<T> |
wrapHandler(MessageHandlingMember<T> original)
Enhance the given
original handler. |
protected TracingHandlerEnhancerDefinition(TracingHandlerEnhancerDefinition.Builder builder)
TracingHandlerEnhancerDefinition
based on the builder.builder
- The builder to construct the TracingHandlerEnhancerDefinition
from.public static TracingHandlerEnhancerDefinition.Builder builder()
TracingHandlerEnhancerDefinition
.
The showEventSourcingHandlers
is defaulted to false
. The SpanFactory
is a hard
requirement and should be provided.
TracingHandlerEnhancerDefinition
.public <T> MessageHandlingMember<T> wrapHandler(@Nonnull MessageHandlingMember<T> original)
HandlerEnhancerDefinition
original
handler. Implementations may return the original message handler.wrapHandler
in interface HandlerEnhancerDefinition
T
- The type of object that will perform the actual handling of the messageoriginal
- The original message handlerCopyright © 2010–2024. All rights reserved.