Class DefaultQueryUpdateEmitterSpanFactory
java.lang.Object
org.axonframework.messaging.queryhandling.tracing.DefaultQueryUpdateEmitterSpanFactory
- All Implemented Interfaces:
QueryUpdateEmitterSpanFactory
public class DefaultQueryUpdateEmitterSpanFactory
extends Object
implements QueryUpdateEmitterSpanFactory
Default implementation of the
QueryUpdateEmitterSpanFactory.- Since:
- 4.9.0
- Author:
- Mitchell Herrijgers
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder class to instantiate aDefaultQueryUpdateEmitterSpanFactory. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCreates a newDefaultQueryUpdateEmitterSpanFactoryusing the providedbuilder. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a Builder to be able to create aDefaultQueryUpdateEmitterSpanFactory.Creates a span for the actual emit of a query update when the UnitOfWork commits (or immediately if no UnitOfWork is active).Creates a span for the scheduling of emitting a query update.<M extends SubscriptionQueryUpdateMessage>
MpropagateContext(M update) Propagates the context of the current span to the given update message.
-
Constructor Details
-
DefaultQueryUpdateEmitterSpanFactory
protected DefaultQueryUpdateEmitterSpanFactory(DefaultQueryUpdateEmitterSpanFactory.Builder builder) Creates a newDefaultQueryUpdateEmitterSpanFactoryusing the providedbuilder.- Parameters:
builder- The builder to build theDefaultQueryUpdateEmitterSpanFactoryfrom.
-
-
Method Details
-
builder
Creates a Builder to be able to create aDefaultQueryUpdateEmitterSpanFactory. ThespanFactoryis a required field and should be provided.- Returns:
- a Builder to be able to create a
DefaultQueryUpdateEmitterSpanFactory
-
createUpdateScheduleEmitSpan
Description copied from interface:QueryUpdateEmitterSpanFactoryCreates a span for the scheduling of emitting a query update. Query update are scheduled to be emitted in the commit phase of the UnitOfWork, so these traces are separated to see the proper timings.- Specified by:
createUpdateScheduleEmitSpanin interfaceQueryUpdateEmitterSpanFactory- Parameters:
update- The update to create a span for.- Returns:
- The created span.
-
createUpdateEmitSpan
Description copied from interface:QueryUpdateEmitterSpanFactoryCreates a span for the actual emit of a query update when the UnitOfWork commits (or immediately if no UnitOfWork is active).- Specified by:
createUpdateEmitSpanin interfaceQueryUpdateEmitterSpanFactory- Parameters:
update- The update to create a span for.- Returns:
- The created span.
-
propagateContext
Description copied from interface:QueryUpdateEmitterSpanFactoryPropagates the context of the current span to the given update message.- Specified by:
propagateContextin interfaceQueryUpdateEmitterSpanFactory- Type Parameters:
M- The type of the update message.- Parameters:
update- The update message to propagate the context to.- Returns:
- The update message with the propagated context.
-