Interface CommandBusSpanFactory
- All Known Implementing Classes:
DefaultCommandBusSpanFactory
public interface CommandBusSpanFactory
Span factory that creates spans for the
CommandBus. You can customize the spans of the bus by creating your
own implementation.- Since:
- 4.9.0
- Author:
- Mitchell Herrijgers
-
Method Summary
Modifier and TypeMethodDescriptioncreateDispatchCommandSpan(CommandMessage commandMessage, boolean distributed) Creates a span for the dispatching of a command.createHandleCommandSpan(CommandMessage commandMessage, boolean distributed) Creates a span for the handling of a command.<T> CommandMessagepropagateContext(CommandMessage commandMessage) Propagates the context of the current span to the given command message.
-
Method Details
-
createDispatchCommandSpan
Creates a span for the dispatching of a command.- Parameters:
commandMessage- The command message to create a span for.distributed- Whether the command is distributed or not.- Returns:
- The created span.
-
createHandleCommandSpan
Creates a span for the handling of a command.- Parameters:
commandMessage- The command message to create a span for.distributed- Whether the command is distributed or not.- Returns:
- The created span.
-
propagateContext
Propagates the context of the current span to the given command message.- Type Parameters:
T- The type of the payload of the command message.- Parameters:
commandMessage- The command message to propagate the context to.- Returns:
- The command message with the propagated context.
-