Class DefaultSpanAttributesProviderRegistry
- All Implemented Interfaces:
DescribableComponent,SpanAttributesProviderRegistry
SpanAttributesProviderRegistry, maintaining a list of
SpanAttributesProvider builders resolved on providers(Configuration).
Registered as the default SpanAttributesProviderRegistry component by
invalid reference
TracingConfigurationDefaults
- Since:
- 5.3.0
- Author:
- Mateusz Nowak
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddescribeTo(ComponentDescriptor descriptor) Describe the properties ofthis DescribableComponentwith the givendescriptor.providers(Configuration config) Returns the list ofSpanAttributesProvidersregistered in this registry, in registration order.registerProvider(ComponentBuilder<SpanAttributesProvider> providerBuilder) Registers the givenproviderBuilderconstructing aSpanAttributesProviderto include in theSpanFactorybuilt from this registry.
-
Constructor Details
-
DefaultSpanAttributesProviderRegistry
public DefaultSpanAttributesProviderRegistry()
-
-
Method Details
-
registerProvider
public SpanAttributesProviderRegistry registerProvider(ComponentBuilder<SpanAttributesProvider> providerBuilder) Description copied from interface:SpanAttributesProviderRegistryRegisters the givenproviderBuilderconstructing aSpanAttributesProviderto include in theSpanFactorybuilt from this registry.- Specified by:
registerProviderin interfaceSpanAttributesProviderRegistry- Parameters:
providerBuilder- theSpanAttributesProviderbuilder to register- Returns:
- this
SpanAttributesProviderRegistry, for fluent interfacing
-
providers
Description copied from interface:SpanAttributesProviderRegistryReturns the list ofSpanAttributesProvidersregistered in this registry, in registration order.- Specified by:
providersin interfaceSpanAttributesProviderRegistry- Parameters:
config- the configuration to build allSpanAttributesProviderswith- Returns:
- the list of
SpanAttributesProviders
-
describeTo
Description copied from interface:DescribableComponentDescribe the properties ofthis DescribableComponentwith the givendescriptor.Components should call the appropriate
describePropertymethods on the descriptor to register their properties. The descriptor is responsible for determining how these properties are formatted and structured in the final output.Best Practices: As a general rule, all relevant fields of a
DescribableComponentimplementation should be described in this method. However, developers have discretion to include only the fields that make sense in the context. Not every field may be meaningful for description purposes, especially internal implementation details. Furthermore, components might want to expose different information based on their current state. The final decision on what properties to include lies with the person implementing thedescribeTomethod, who should focus on providing information that is useful for understanding the component's configuration and state.Example implementation:
public void describeTo(ComponentDescriptor descriptor) { descriptor.describeProperty("name", this.name); descriptor.describeProperty("enabled", this.enabled); descriptor.describeProperty("configuration", this.configuration); // A nested component descriptor.describeProperty("handlers", this.eventHandlers); // A collection }- Specified by:
describeToin interfaceDescribableComponent- Parameters:
descriptor- The component descriptor to describethis DescribableComponentn its properties in.
-