Class EventSourcingSpanAttributesProviderConfigurationEnhancer

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

@Internal @RegistrationScope("Contribute the providers once at the root; do not re-invoke in child module registries. The registry decorator is copied down on its own - re-invoking per nesting level would register the same providers multiple times, duplicating span attributes.") public final class EventSourcingSpanAttributesProviderConfigurationEnhancer extends Object implements ConfigurationEnhancer
ConfigurationEnhancer contributing the built-in event-sourcing SpanAttributesProviders to the SpanAttributesProviderRegistry. Discovered automatically via ServiceLoader.

The EventTagsSpanAttributesProvider requires a TagResolver - a framework-registered component - so it is only contributed when one is present in the configuration. Contribution is a decorator on the registry component, so both the EventSourcingTracingSettings.spanAttributesProviders() toggle and the TagResolver presence are evaluated when the registry is resolved - right before the SpanFactory consuming it is constructed, once all component registrations are known.

Since:
5.3.0
Author:
Mateusz Nowak
  • Constructor Details

    • EventSourcingSpanAttributesProviderConfigurationEnhancer

      public EventSourcingSpanAttributesProviderConfigurationEnhancer()
  • 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.