public class DefaultCommandBusSpanFactory extends Object implements CommandBusSpanFactory
CommandBusSpanFactory. Can be configured to include the command handling of a
distributed command in the same trace or not (true by default).| Modifier and Type | Class and Description |
|---|---|
static class |
DefaultCommandBusSpanFactory.Builder
Builder class to instantiate a
DefaultCommandBusSpanFactory. |
| Modifier | Constructor and Description |
|---|---|
protected |
DefaultCommandBusSpanFactory(DefaultCommandBusSpanFactory.Builder builder)
Creates a new
DefaultCommandBusSpanFactory using the provided builder. |
| Modifier and Type | Method and Description |
|---|---|
static DefaultCommandBusSpanFactory.Builder |
builder()
Creates a Builder to be able to create a
DefaultCommandBusSpanFactory. |
Span |
createDispatchCommandSpan(CommandMessage<?> commandMessage,
boolean distributed)
Creates a span for the dispatching of a command.
|
Span |
createHandleCommandSpan(CommandMessage<?> commandMessage,
boolean distributed)
Creates a span for the handling of a command.
|
<T> CommandMessage<T> |
propagateContext(CommandMessage<T> commandMessage)
Propagates the context of the current span to the given command message.
|
protected DefaultCommandBusSpanFactory(DefaultCommandBusSpanFactory.Builder builder)
DefaultCommandBusSpanFactory using the provided builder.builder - The builder to build the DefaultCommandBusSpanFactory from.public Span createDispatchCommandSpan(CommandMessage<?> commandMessage, boolean distributed)
CommandBusSpanFactorycreateDispatchCommandSpan in interface CommandBusSpanFactorycommandMessage - The command message to create a span for.distributed - Whether the command is distributed or not.public Span createHandleCommandSpan(CommandMessage<?> commandMessage, boolean distributed)
CommandBusSpanFactorycreateHandleCommandSpan in interface CommandBusSpanFactorycommandMessage - The command message to create a span for.distributed - Whether the command is distributed or not.public <T> CommandMessage<T> propagateContext(CommandMessage<T> commandMessage)
CommandBusSpanFactorypropagateContext in interface CommandBusSpanFactoryT - The type of the payload of the command message.commandMessage - The command message to propagate the context to.public static DefaultCommandBusSpanFactory.Builder builder()
DefaultCommandBusSpanFactory. The default values are:
distributedCommandInSameTrace defaults to truespanFactory is a required field and should be provided.DefaultCommandBusSpanFactoryCopyright © 2010–2025. All rights reserved.