Interface SpanAttributesProviderRegistry
- All Superinterfaces:
DescribableComponent
- All Known Implementing Classes:
DefaultSpanAttributesProviderRegistry
A registry of
SpanAttributesProviders, collecting the providers a
SpanFactory implementation is constructed with.
Provides operations to register providers one by one. Registered providers can be retrieved through
providers(Configuration) -- typically by the component builder constructing the SpanFactory, so the
factory receives its complete, immutable provider list at construction time.
Registration operations are expected to be invoked within a DecoratorDefinition on this
registry component. As such, any registered provider is only applied when the SpanFactory
requiring it is constructed. Providers that are registered once the SpanFactory has already been constructed
are not taken into account.
- Since:
- 5.3.0
- Author:
- Mateusz Nowak
-
Method Summary
Modifier and TypeMethodDescriptionproviders(Configuration config) Returns the list ofSpanAttributesProvidersregistered in this registry, in registration order.static voidregister(ComponentRegistry componentRegistry, ComponentBuilder<SpanAttributesProvider> providerBuilder) Contributes aSpanAttributesProviderto the registry component in the givencomponentRegistry.registerProvider(ComponentBuilder<SpanAttributesProvider> providerBuilder) Registers the givenproviderBuilderconstructing aSpanAttributesProviderto include in theSpanFactorybuilt from this registry.Methods inherited from interface org.axonframework.common.infra.DescribableComponent
describeTo
-
Method Details
-
registerProvider
SpanAttributesProviderRegistry registerProvider(ComponentBuilder<SpanAttributesProvider> providerBuilder) Registers the givenproviderBuilderconstructing aSpanAttributesProviderto include in theSpanFactorybuilt from this registry.- Parameters:
providerBuilder- theSpanAttributesProviderbuilder to register- Returns:
- this
SpanAttributesProviderRegistry, for fluent interfacing
-
providers
Returns the list ofSpanAttributesProvidersregistered in this registry, in registration order.- Parameters:
config- the configuration to build allSpanAttributesProviderswith- Returns:
- the list of
SpanAttributesProviders
-
register
@Internal static void register(ComponentRegistry componentRegistry, ComponentBuilder<SpanAttributesProvider> providerBuilder) Contributes aSpanAttributesProviderto the registry component in the givencomponentRegistry.Registers a decorator that contributes the provider when the registry is resolved, before the
SpanFactoryconsuming it is constructed.- Parameters:
componentRegistry- the component registry to contribute the provider toproviderBuilder- theSpanAttributesProviderbuilder to register
-