public class DefaultQueryBusSpanFactory extends Object implements QueryBusSpanFactory
QueryBusSpanFactory
. Can be configured to include the query handling of a
distributed query in the same trace or not (true by default).Modifier and Type | Class and Description |
---|---|
static class |
DefaultQueryBusSpanFactory.Builder
Builder class to instantiate a
DefaultQueryBusSpanFactory . |
Modifier | Constructor and Description |
---|---|
protected |
DefaultQueryBusSpanFactory(DefaultQueryBusSpanFactory.Builder builder)
Creates a new
DefaultQueryBusSpanFactory using the provided builder . |
Modifier and Type | Method and Description |
---|---|
static DefaultQueryBusSpanFactory.Builder |
builder()
Creates a Builder to be able to create a
DefaultQueryBusSpanFactory . |
Span |
createQueryProcessingSpan(QueryMessage<?,?> queryMessage)
Creates a span for processing a query.
|
Span |
createQuerySpan(QueryMessage<?,?> queryMessage,
boolean distributed)
Creates a span for a query.
|
Span |
createResponseProcessingSpan(QueryMessage<?,?> queryMessage)
Creates a span for processing a response.
|
Span |
createScatterGatherHandlerSpan(QueryMessage<?,?> queryMessage,
int handlerIndex)
Creates a span for one of the handlers of a scatter-gather query.
|
Span |
createScatterGatherSpan(QueryMessage<?,?> queryMessage,
boolean distributed)
Creates a span for a scatter-gather query.
|
Span |
createStreamingQuerySpan(QueryMessage<?,?> queryMessage,
boolean distributed)
Creates a span for a streaming query.
|
Span |
createSubscriptionQueryProcessUpdateSpan(SubscriptionQueryUpdateMessage<?> updateMessage,
SubscriptionQueryMessage<?,?,?> queryMessage)
Creates a span for processing a subscription query update that has been received from the server.
|
Span |
createSubscriptionQuerySpan(SubscriptionQueryMessage<?,?,?> queryMessage,
boolean distributed)
Creates a span for a subscription query.
|
<T,R,M extends QueryMessage<T,R>> |
propagateContext(M queryMessage)
Propagates the context of the current span to the given
queryMessage . |
protected DefaultQueryBusSpanFactory(DefaultQueryBusSpanFactory.Builder builder)
DefaultQueryBusSpanFactory
using the provided builder
.builder
- The builder to build the DefaultQueryBusSpanFactory
from.public Span createQuerySpan(QueryMessage<?,?> queryMessage, boolean distributed)
QueryBusSpanFactory
createQuerySpan
in interface QueryBusSpanFactory
queryMessage
- The query message being dispatched.distributed
- Whether the query is from a distributed source.public Span createSubscriptionQuerySpan(SubscriptionQueryMessage<?,?,?> queryMessage, boolean distributed)
QueryBusSpanFactory
createSubscriptionQuerySpan
in interface QueryBusSpanFactory
queryMessage
- The subscription query message being dispatched.distributed
- Whether the subscription query is from a distributed source.public Span createSubscriptionQueryProcessUpdateSpan(SubscriptionQueryUpdateMessage<?> updateMessage, SubscriptionQueryMessage<?,?,?> queryMessage)
QueryBusSpanFactory
createSubscriptionQueryProcessUpdateSpan
in interface QueryBusSpanFactory
updateMessage
- The update message being handled.queryMessage
- The subscription query message that the update is for.public Span createScatterGatherSpan(QueryMessage<?,?> queryMessage, boolean distributed)
QueryBusSpanFactory
createScatterGatherSpan
in interface QueryBusSpanFactory
queryMessage
- The query message being handled.distributed
- Whether the query is from a distributed source.public Span createScatterGatherHandlerSpan(QueryMessage<?,?> queryMessage, int handlerIndex)
QueryBusSpanFactory
createScatterGatherHandlerSpan
in interface QueryBusSpanFactory
queryMessage
- The query message being handled.handlerIndex
- The index of the handler. Starts at 0.public Span createStreamingQuerySpan(QueryMessage<?,?> queryMessage, boolean distributed)
QueryBusSpanFactory
createStreamingQuerySpan
in interface QueryBusSpanFactory
queryMessage
- The query message being dispatched.distributed
- Whether the query is from a distributed source.public Span createQueryProcessingSpan(QueryMessage<?,?> queryMessage)
QueryBusSpanFactory
createQueryProcessingSpan
in interface QueryBusSpanFactory
queryMessage
- The query message being handled.public Span createResponseProcessingSpan(QueryMessage<?,?> queryMessage)
QueryBusSpanFactory
createResponseProcessingSpan
in interface QueryBusSpanFactory
queryMessage
- The query message the response is for.public <T,R,M extends QueryMessage<T,R>> M propagateContext(M queryMessage)
QueryBusSpanFactory
queryMessage
.propagateContext
in interface QueryBusSpanFactory
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.queryMessage
- The query message to propagate the context to.public static DefaultQueryBusSpanFactory.Builder builder()
DefaultQueryBusSpanFactory
. The default values are:
distributedInSameTrace
defaults to true
spanFactory
is a required field and should be provided.DefaultQueryBusSpanFactory
Copyright © 2010–2024. All rights reserved.