Class DefaultEventBusSpanFactory
java.lang.Object
org.axonframework.messaging.eventhandling.tracing.DefaultEventBusSpanFactory
- All Implemented Interfaces:
EventBusSpanFactory
Default implementation of the
EventBusSpanFactory.- Since:
- 4.9.0
- Author:
- Mitchell Herrijgers
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder class to instantiate aDefaultEventBusSpanFactory. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCreates a newDefaultEventBusSpanFactoryusing the providedbuilder. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a newDefaultEventBusSpanFactory.Builderto build aDefaultEventBusSpanFactorywith.Creates a span for the committing of events.createPublishEventSpan(EventMessage eventMessage) Creates a span for the publishing of an event.propagateContext(EventMessage eventMessage) Propagates the context of the current span to the given event message.
-
Constructor Details
-
DefaultEventBusSpanFactory
Creates a newDefaultEventBusSpanFactoryusing the providedbuilder.- Parameters:
builder- The builder to build theDefaultEventBusSpanFactoryfrom.
-
-
Method Details
-
createPublishEventSpan
Description copied from interface:EventBusSpanFactoryCreates a span for the publishing of an event. This span is created when the event is published on theEventBus. This span does not include the actual commit of the event, this is represented by theEventBusSpanFactory.createCommitEventsSpan()and may occur later.- Specified by:
createPublishEventSpanin interfaceEventBusSpanFactory- Parameters:
eventMessage- The event message to create a span for.- Returns:
- The created span.
-
createCommitEventsSpan
Description copied from interface:EventBusSpanFactoryCreates a span for the committing of events. This is usually batched and done in the commit phase of a UnitOfWork. If no UnitOfWork is active, the commit is done immediately.- Specified by:
createCommitEventsSpanin interfaceEventBusSpanFactory- Returns:
- The created span.
-
propagateContext
Description copied from interface:EventBusSpanFactoryPropagates the context of the current span to the given event message.- Specified by:
propagateContextin interfaceEventBusSpanFactory- Parameters:
eventMessage- The event message to propagate the context to.- Returns:
- The event message with the propagated context.
-
builder
Creates a newDefaultEventBusSpanFactory.Builderto build aDefaultEventBusSpanFactorywith. ThespanFactoryis a required field and should be provided.- Returns:
- The
DefaultEventBusSpanFactory.Builderto build aDefaultEventBusSpanFactorywith.
-