Class DeclarativeConfigurationBuilder
java.lang.Object
io.opentelemetry.sdk.extension.incubator.fileconfig.DeclarativeConfigurationBuilder
- All Implemented Interfaces:
DeclarativeConfigurationCustomizer
public class DeclarativeConfigurationBuilder
extends Object
implements DeclarativeConfigurationCustomizer
Builder for the declarative configuration.
-
Constructor Summary
Constructors -
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.io.opentelemetry.sdk.extension.incubator.fileconfig.internal.model.OpenTelemetryConfigurationModelcustomizeModel(io.opentelemetry.sdk.extension.incubator.fileconfig.internal.model.OpenTelemetryConfigurationModel configurationModel) Customize the configuration model.
-
Constructor Details
-
DeclarativeConfigurationBuilder
public DeclarativeConfigurationBuilder()
-
-
Method Details
-
addModelCustomizer
public void addModelCustomizer(Function<io.opentelemetry.sdk.extension.incubator.fileconfig.internal.model.OpenTelemetryConfigurationModel, io.opentelemetry.sdk.extension.incubator.fileconfig.internal.model.OpenTelemetryConfigurationModel> customizer) Description copied from interface:DeclarativeConfigurationCustomizerMethod invoked when configuring the SDK to allow further customization of the declarative configuration.- Specified by:
addModelCustomizerin interfaceDeclarativeConfigurationCustomizer- Parameters:
customizer- the customizer to add
-
addSpanExporterCustomizer
public <T extends io.opentelemetry.sdk.trace.export.SpanExporter> void addSpanExporterCustomizer(Class<T> exporterType, BiFunction<T, io.opentelemetry.api.incubator.config.DeclarativeConfigProperties, T> customizer) Description copied from interface:DeclarativeConfigurationCustomizerAdd customizer forSpanExporterinstances created from declarative configuration. Multiple customizers compose in registration order.- Specified by:
addSpanExporterCustomizerin interfaceDeclarativeConfigurationCustomizer- 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
public <T extends io.opentelemetry.sdk.metrics.export.MetricExporter> void addMetricExporterCustomizer(Class<T> exporterType, BiFunction<T, io.opentelemetry.api.incubator.config.DeclarativeConfigProperties, T> customizer) Description copied from interface:DeclarativeConfigurationCustomizerAdd customizer forMetricExporterinstances created from declarative configuration. Multiple customizers compose in registration order.- Specified by:
addMetricExporterCustomizerin interfaceDeclarativeConfigurationCustomizer- 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
public <T extends io.opentelemetry.sdk.logs.export.LogRecordExporter> void addLogRecordExporterCustomizer(Class<T> exporterType, BiFunction<T, io.opentelemetry.api.incubator.config.DeclarativeConfigProperties, T> customizer) Description copied from interface:DeclarativeConfigurationCustomizerAdd 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.- Specified by:
addLogRecordExporterCustomizerin interfaceDeclarativeConfigurationCustomizer- 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
-
customizeModel
public io.opentelemetry.sdk.extension.incubator.fileconfig.internal.model.OpenTelemetryConfigurationModel customizeModel(io.opentelemetry.sdk.extension.incubator.fileconfig.internal.model.OpenTelemetryConfigurationModel configurationModel) Customize the configuration model.
-