Package org.axonframework.queryhandling
Interface QueryBusSpanFactory
- All Known Implementing Classes:
DefaultQueryBusSpanFactory
public interface QueryBusSpanFactory
Span factory that creates spans for the
QueryBus. You can customize the spans of the bus by creating your own
implementation.- Since:
- 4.9.0
- Author:
- Mitchell Herrijgers
-
Method Summary
Modifier and TypeMethodDescriptioncreateQueryProcessingSpan(QueryMessage<?, ?> queryMessage) Creates a span for processing a query.createQuerySpan(QueryMessage<?, ?> queryMessage, boolean distributed) Creates a span for a query.createResponseProcessingSpan(QueryMessage<?, ?> queryMessage) Creates a span for processing a response.createScatterGatherHandlerSpan(QueryMessage<?, ?> queryMessage, int handlerIndex) Creates a span for one of the handlers of a scatter-gather query.createScatterGatherSpan(QueryMessage<?, ?> queryMessage, boolean distributed) Creates a span for a scatter-gather query.createStreamingQuerySpan(QueryMessage<?, ?> queryMessage, boolean distributed) Creates a span for a streaming query.createSubscriptionQueryProcessUpdateSpan(SubscriptionQueryUpdateMessage<?> updateMessage, SubscriptionQueryMessage<?, ?, ?> queryMessage) Creates a span for processing a subscription query update that has been received from the server.createSubscriptionQuerySpan(SubscriptionQueryMessage<?, ?, ?> queryMessage, boolean distributed) Creates a span for a subscription query.<T,R, M extends QueryMessage<T, R>>
MpropagateContext(M queryMessage) Propagates the context of the current span to the givenqueryMessage.
-
Method Details
-
createQuerySpan
Creates a span for a query.- Parameters:
queryMessage- The query message being dispatched.distributed- Whether the query is from a distributed source.- Returns:
- The span for the handling of the query.
-
createSubscriptionQuerySpan
Creates a span for a subscription query.- Parameters:
queryMessage- The subscription query message being dispatched.distributed- Whether the subscription query is from a distributed source.- Returns:
- The span for the handling of the subscription query.
-
createSubscriptionQueryProcessUpdateSpan
Span createSubscriptionQueryProcessUpdateSpan(SubscriptionQueryUpdateMessage<?> updateMessage, SubscriptionQueryMessage<?, ?, ?> queryMessage) Creates a span for processing a subscription query update that has been received from the server.- Parameters:
updateMessage- The update message being handled.queryMessage- The subscription query message that the update is for.- Returns:
- The span for the processing of the subscription query update.
-
createScatterGatherSpan
Creates a span for a scatter-gather query.- Parameters:
queryMessage- The query message being handled.distributed- Whether the query is from a distributed source.- Returns:
- The span for the handling of the scatter-gather query.
-
createScatterGatherHandlerSpan
Creates a span for one of the handlers of a scatter-gather query. There can be multiple for the same within one application. The handler index is used to distinguish between them.- Parameters:
queryMessage- The query message being handled.handlerIndex- The index of the handler. Starts at 0.- Returns:
- The span for the handling of the scatter-gather query.
-
createStreamingQuerySpan
Creates a span for a streaming query.- Parameters:
queryMessage- The query message being dispatched.distributed- Whether the query is from a distributed source.- Returns:
- The span for the handling of the streaming query.
-
createQueryProcessingSpan
Creates a span for processing a query. Distributed implementations can use this to create a span for the entire query processing on the handling side.- Parameters:
queryMessage- The query message being handled.- Returns:
- The span for the processing of the query.
-
createResponseProcessingSpan
Creates a span for processing a response. Distributed implementations can use this to create a span for the entire response processing on the sending side.- Parameters:
queryMessage- The query message the response is for.- Returns:
- The span for the processing of the response.
-
propagateContext
Propagates the context of the current span to the givenqueryMessage.- Type Parameters:
T- The type of the payload of the query message.R- The type of the response of the query message.M- The type of the query message.- Parameters:
queryMessage- The query message to propagate the context to.- Returns:
- The query message with the context of the current span.
-