Interface ComponentProvider<T>
- Type Parameters:
T
- the type of the SDK extension component. SeegetType()
. Supported values include:SpanExporter
,MetricExporter
,LogRecordExporter
,SpanProcessor
,LogRecordProcessor
,TextMapPropagator
,Sampler
,Resource
.
- All Known Implementing Classes:
OtlpLogRecordExporterComponentProvider
,OtlpMetricExporterComponentProvider
,OtlpSpanExporterComponentProvider
public interface ComponentProvider<T>
Provides configured instances of SDK extension components.
ComponentProvider
allows SDK
extension components which are not part of the core SDK to be referenced in declarative based
configuration.
NOTE: when getType()
is Resource
, the getName()
is not (currently)
used, and create(StructuredConfigProperties)
is (currently) called with an empty StructuredConfigProperties
.
This class is internal and is hence not for public use. Its APIs are unstable and can change at any time.
-
Method Summary
-
Method Details
-
getType
The type of SDK extension component. For example, if providing instances of a custom span exporter, the type would beSpanExporter
. -
getName
String getName()The name of the exporter, to be referenced in configuration files. For example, if providing instances of a custom span exporter for the "acme" protocol, the name might be "acme".This name MUST not be the same as any other component provider name which returns components of the same
type
. In other words,getType()
and name form a composite key uniquely identifying the provider. -
create
Configure an instance of the SDK extension component according to theconfig
.- Parameters:
config
- the configuration provided where the component is referenced in a configuration file.- Returns:
- an instance the SDK extension component
-