Interface DeclarativeConfigurationCustomizer

All Known Implementing Classes:
DeclarativeConfigurationBuilder

public interface DeclarativeConfigurationCustomizer
A service provider interface (SPI) for customizing declarative configuration.
  • 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.
  • 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 for SpanExporter instances created from declarative configuration. Multiple customizers compose in registration order.
      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

      <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. Multiple customizers compose in registration order.
      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

      <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. Multiple customizers compose in registration order.

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

      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