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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    <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 for LogRecordExporter instances created from declarative configuration.
    <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 for MetricExporter instances created from declarative configuration.
    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.
    <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 for SpanExporter instances created from declarative configuration.
    io.opentelemetry.sdk.extension.incubator.fileconfig.internal.model.OpenTelemetryConfigurationModel
    customizeModel(io.opentelemetry.sdk.extension.incubator.fileconfig.internal.model.OpenTelemetryConfigurationModel configurationModel)
    Customize the configuration model.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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: DeclarativeConfigurationCustomizer
      Method invoked when configuring the SDK to allow further customization of the declarative configuration.
      Specified by:
      addModelCustomizer in interface DeclarativeConfigurationCustomizer
      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: DeclarativeConfigurationCustomizer
      Add customizer for SpanExporter instances created from declarative configuration. Multiple customizers compose in registration order.
      Specified by:
      addSpanExporterCustomizer in interface DeclarativeConfigurationCustomizer
      Type Parameters:
      T - the exporter type
      Parameters:
      exporterType - the exporter type to customize
      customizer - 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: DeclarativeConfigurationCustomizer
      Add customizer for MetricExporter instances created from declarative configuration. Multiple customizers compose in registration order.
      Specified by:
      addMetricExporterCustomizer in interface DeclarativeConfigurationCustomizer
      Type Parameters:
      T - the exporter type
      Parameters:
      exporterType - the exporter type to customize
      customizer - 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: DeclarativeConfigurationCustomizer
      Add customizer for LogRecordExporter instances created from declarative configuration. Multiple customizers compose in registration order.

      If the customizer wraps the exporter in a new Closeable instance, the customizer is responsible for resource cleanup.

      Specified by:
      addLogRecordExporterCustomizer in interface DeclarativeConfigurationCustomizer
      Type Parameters:
      T - the exporter type
      Parameters:
      exporterType - the exporter type to customize
      customizer - 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.