Class EventSourcingTracingConfigurationEnhancer

java.lang.Object
org.axonframework.eventsourcing.tracing.configuration.EventSourcingTracingConfigurationEnhancer
All Implemented Interfaces:
ConfigurationEnhancer

@Internal @RegistrationScope("Register decorators once at the root; do not re-invoke in child module registries (the DecoratorDefinitions are copied down and reach module-built components on their own). Re-invoking per nesting level re-registers the decorators and produces duplicate nested spans.") public final class EventSourcingTracingConfigurationEnhancer extends Object implements ConfigurationEnhancer
ConfigurationEnhancer that wires tracing into axon-eventsourcing components. Discovered automatically via ServiceLoader, so dropping the axon-eventsourcing module on the classpath is enough.

A component is only decorated when a non-no-op SpanFactory is configured and the corresponding toggle in EventSourcingTracingSettings is enabled.

Since:
5.3.0
Author:
Mateusz Nowak
  • Field Details

    • TRACING_DECORATOR_ORDER

      public static final int TRACING_DECORATOR_ORDER
      Decorator order for the event-sourcing tracing decorators. Near-maximal so tracing is applied last and is the outermost wrapper - spans cover all inner decorators, and tracing wrappers are reliably detectable by an outermost instanceof check. Same value and rationale as MessagingTracingConfigurationEnhancer.TRACING_DECORATOR_ORDER.
      See Also:
  • Constructor Details

    • EventSourcingTracingConfigurationEnhancer

      public EventSourcingTracingConfigurationEnhancer()
  • Method Details

    • enhance

      public void enhance(ComponentRegistry registry)
      Description copied from interface: ConfigurationEnhancer
      Enhances the given registry with, for example, additional components and decorators.
      Specified by:
      enhance in interface ConfigurationEnhancer
      Parameters:
      registry - The registry instance to enhance.
    • order

      public int order()
      Description copied from interface: ConfigurationEnhancer
      Returns the relative order this enhancer should be invoked in, compared to other instances.

      Use lower (negative) values for enhancers providing sensible defaults, and higher values for enhancers that should be able to override values potentially previously set. Defaults to 0 when not set.

      Specified by:
      order in interface ConfigurationEnhancer
      Returns:
      The order in which this enhancer should be invoked.