Interface DeclarativeConfigurationCustomizer
- All Known Implementing Classes:
DeclarativeConfigurationBuilder
public interface DeclarativeConfigurationCustomizer
A service provider interface (SPI) for customizing declarative configuration.
-
Method Summary
Modifier and TypeMethodDescription<T extends io.opentelemetry.sdk.logs.export.LogRecordExporter>
voidaddLogRecordExporterCustomizer(Class<T> exporterType, BiFunction<T, io.opentelemetry.api.incubator.config.DeclarativeConfigProperties, T> customizer) Add customizer forLogRecordExporterinstances created from declarative configuration.<T extends io.opentelemetry.sdk.metrics.export.MetricExporter>
voidaddMetricExporterCustomizer(Class<T> exporterType, BiFunction<T, io.opentelemetry.api.incubator.config.DeclarativeConfigProperties, T> customizer) Add customizer forMetricExporterinstances created from declarative configuration.voidaddModelCustomizer(Function<io.opentelemetry.sdk.extension.incubator.fileconfig.internal.model.OpenTelemetryConfigurationModel, io.opentelemetry.sdk.extension.incubator.fileconfig.internal.model.OpenTelemetryConfigurationModel> customizer) Method invoked when configuring the SDK to allow further customization of the declarative configuration.<T extends io.opentelemetry.sdk.trace.export.SpanExporter>
voidaddSpanExporterCustomizer(Class<T> exporterType, BiFunction<T, io.opentelemetry.api.incubator.config.DeclarativeConfigProperties, T> customizer) Add customizer forSpanExporterinstances created from declarative configuration.
-
Method Details
-
addModelCustomizer
void addModelCustomizer(Function<io.opentelemetry.sdk.extension.incubator.fileconfig.internal.model.OpenTelemetryConfigurationModel, io.opentelemetry.sdk.extension.incubator.fileconfig.internal.model.OpenTelemetryConfigurationModel> customizer) Method invoked when configuring the SDK to allow further customization of the declarative configuration.- Parameters:
customizer- the customizer to add
-
addSpanExporterCustomizer
<T extends io.opentelemetry.sdk.trace.export.SpanExporter> void addSpanExporterCustomizer(Class<T> exporterType, BiFunction<T, io.opentelemetry.api.incubator.config.DeclarativeConfigProperties, T> customizer) Add customizer forSpanExporterinstances created from declarative configuration. Multiple customizers compose in registration order.- Type Parameters:
T- the exporter type- Parameters:
exporterType- the exporter type to customizecustomizer- function receiving (exporter, properties) and returning customized exporter; must not return null
-
addMetricExporterCustomizer
<T extends io.opentelemetry.sdk.metrics.export.MetricExporter> void addMetricExporterCustomizer(Class<T> exporterType, BiFunction<T, io.opentelemetry.api.incubator.config.DeclarativeConfigProperties, T> customizer) Add customizer forMetricExporterinstances created from declarative configuration. Multiple customizers compose in registration order.- Type Parameters:
T- the exporter type- Parameters:
exporterType- the exporter type to customizecustomizer- function receiving (exporter, properties) and returning customized exporter; must not return null
-
addLogRecordExporterCustomizer
<T extends io.opentelemetry.sdk.logs.export.LogRecordExporter> void addLogRecordExporterCustomizer(Class<T> exporterType, BiFunction<T, io.opentelemetry.api.incubator.config.DeclarativeConfigProperties, T> customizer) Add customizer forLogRecordExporterinstances created from declarative configuration. Multiple customizers compose in registration order.If the customizer wraps the exporter in a new
Closeableinstance, the customizer is responsible for resource cleanup.- Type Parameters:
T- the exporter type- Parameters:
exporterType- the exporter type to customizecustomizer- function receiving (exporter, properties) and returning customized exporter; must not return null
-