Class MessagingSpanAttributesProviderConfigurationEnhancer

java.lang.Object
org.axonframework.messaging.tracing.attributes.configuration.MessagingSpanAttributesProviderConfigurationEnhancer
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 MessagingSpanAttributesProviderConfigurationEnhancer extends Object implements ConfigurationEnhancer
ConfigurationEnhancer contributing the built-in message-level SpanAttributesProviders to the SpanAttributesProviderRegistry. Discovered automatically via ServiceLoader.

Contribution is a decorator on the registry component, so the toggles in MessagingTracingSettings.spanAttributesProviders() are read when the registry is resolved -- right before the SpanFactory consuming it is constructed.

Since:
5.3.0
Author:
Mateusz Nowak
  • Constructor Details

    • MessagingSpanAttributesProviderConfigurationEnhancer

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