Interface EventBusSpanFactory
- All Known Implementing Classes:
DefaultEventBusSpanFactory
public interface EventBusSpanFactory
Span factory that creates spans for the
EventBus. You can customize the spans of the bus by creating your
own implementation.- Since:
- 4.9.0
- Author:
- Mitchell Herrijgers
-
Method Summary
Modifier and TypeMethodDescriptionCreates 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.
-
Method Details
-
createPublishEventSpan
Creates 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 thecreateCommitEventsSpan()and may occur later.- Parameters:
eventMessage- The event message to create a span for.- Returns:
- The created span.
-
createCommitEventsSpan
Span createCommitEventsSpan()Creates 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.- Returns:
- The created span.
-
propagateContext
Propagates the context of the current span to the given event message.- Parameters:
eventMessage- The event message to propagate the context to.- Returns:
- The event message with the propagated context.
-