Class TracingAutoConfiguration
axon.tracing.* properties into the framework's native tracing
configuration.
This layer is deliberately thin: it registers the *TracingSettings components derived from
TracingProperties (via registerIfNotPresent, so a user-defined settings bean or component always
wins). Everything else - the built-in attribute providers, their toggles, and the tracing decorators - is wired
natively by the ServiceLoader-discovered enhancers of the framework modules, driven by these settings.
The SpanFactory is optional and contributed by a tracing backend (for example an
OpenTelemetry-backed SpanFactory registered by its own autoconfiguration). When no factory component is
present, component decorators are not installed. The whole configuration backs off when
axon.tracing.enabled is set to false, in which case no settings are registered.
- Since:
- 4.6.0
- Author:
- Mateusz Nowak, Mitchell Herrijgers
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiontracingConfigurationEnhancer(org.springframework.beans.factory.ObjectProvider<SpanAttributesProvider> customProviders, TracingProperties properties) Constructs aConfigurationEnhancertranslating theaxon.tracing.*properties into the tracing settings components.
-
Constructor Details
-
TracingAutoConfiguration
public TracingAutoConfiguration()
-
-
Method Details
-
tracingConfigurationEnhancer
@Bean public ConfigurationEnhancer tracingConfigurationEnhancer(org.springframework.beans.factory.ObjectProvider<SpanAttributesProvider> customProviders, TracingProperties properties) Constructs aConfigurationEnhancertranslating theaxon.tracing.*properties into the tracing settings components.Settings are registered with
registerIfNotPresent: a user-defined settings bean (or an explicitly registered component) takes precedence over the property translation, which in turn takes precedence over the framework modules' nativeenabledByDefault()defaults (registered by enhancers running at maximal order).- Parameters:
customProviders- the Spring-managedSpanAttributesProviderinstances available to tracingproperties- the boundTracingProperties- Returns:
- a
ConfigurationEnhancerregistering the tracing settings with the framework
-