Class EntityIdSpanAttributesProvider

java.lang.Object
org.axonframework.messaging.tracing.attributes.EntityIdSpanAttributesProvider

public final class EntityIdSpanAttributesProvider extends Object
Holder for the shared span attribute key under which an entity's identifier is recorded, regardless of whether that entity is a legacy aggregate or a dynamic-consistency-boundary entity.

Unlike AggregateIdentifierSpanAttributesProvider, this is not a SpanAttributesProvider: there is no generic resource on the ProcessingContext holding "the current entity id" for an arbitrary entity type. Instead, tracing decorators that already know an entity's identifier locally - such as TracingRepository, TracingStateManager, TracingEntityLifecycleHandler, and TracingSnapshotStore - tag their spans with it directly under DEFAULT_ATTRIBUTE_KEY.

AggregateIdentifierSpanAttributesProvider remains the dedicated, legacy-only provider for events sourced through an aggregate-based event storage engine.

Since:
5.3.0
Author:
Mateusz Nowak
  • Field Details

    • DEFAULT_ATTRIBUTE_KEY

      public static final String DEFAULT_ATTRIBUTE_KEY
      Default attribute key under which an entity's identifier is recorded.
      See Also: