Interface AutoConfigurationCustomizer
- All Known Implementing Classes:
AutoConfiguredOpenTelemetrySdkBuilder
-
Method Summary
Modifier and TypeMethodDescriptiondefault AutoConfigurationCustomizer
addLoggerProviderCustomizer
(BiFunction<SdkLoggerProviderBuilder, ConfigProperties, SdkLoggerProviderBuilder> loggerProviderCustomizer) Adds aBiFunction
to invoke the with theSdkLoggerProviderBuilder
to allow customization.default AutoConfigurationCustomizer
addLogRecordExporterCustomizer
(BiFunction<? super LogRecordExporter, ConfigProperties, ? extends LogRecordExporter> exporterCustomizer) Adds aBiFunction
to invoke with the default autoconfiguredLogRecordExporter
to allow customization.default AutoConfigurationCustomizer
addLogRecordProcessorCustomizer
(BiFunction<? super LogRecordProcessor, ConfigProperties, ? extends LogRecordProcessor> logRecordProcessorCustomizer) Adds aBiFunction
to invoke for all autoconfiguredLogRecordProcessor
s.default AutoConfigurationCustomizer
addMeterProviderCustomizer
(BiFunction<SdkMeterProviderBuilder, ConfigProperties, SdkMeterProviderBuilder> meterProviderCustomizer) Adds aBiFunction
to invoke the with theSdkMeterProviderBuilder
to allow customization.default AutoConfigurationCustomizer
addMetricExporterCustomizer
(BiFunction<? super MetricExporter, ConfigProperties, ? extends MetricExporter> exporterCustomizer) Adds aBiFunction
to invoke with the default autoconfiguredMetricExporter
to allow customization.default AutoConfigurationCustomizer
addMetricReaderCustomizer
(BiFunction<? super MetricReader, ConfigProperties, ? extends MetricReader> readerCustomizer) Adds aBiFunction
to invoke with the autoconfiguredMetricReader
to allow customization.addPropagatorCustomizer
(BiFunction<? super TextMapPropagator, ConfigProperties, ? extends TextMapPropagator> propagatorCustomizer) Adds aBiFunction
to invoke with the default autoconfiguredTextMapPropagator
to allow customization.default AutoConfigurationCustomizer
addPropertiesCustomizer
(Function<ConfigProperties, Map<String, String>> propertiesCustomizer) Adds aFunction
to invoke the with theConfigProperties
to allow customization.addPropertiesSupplier
(Supplier<Map<String, String>> propertiesSupplier) Adds aSupplier
of a map of property names and values to use as defaults for theConfigProperties
used during auto-configuration.addResourceCustomizer
(BiFunction<? super Resource, ConfigProperties, ? extends Resource> resourceCustomizer) Adds aBiFunction
to invoke with the default autoconfiguredResource
to allow customization.addSamplerCustomizer
(BiFunction<? super Sampler, ConfigProperties, ? extends Sampler> samplerCustomizer) Adds aBiFunction
to invoke with the default autoconfiguredSampler
to allow customization.addSpanExporterCustomizer
(BiFunction<? super SpanExporter, ConfigProperties, ? extends SpanExporter> exporterCustomizer) Adds aBiFunction
to invoke with the default autoconfiguredSpanExporter
to allow customization.default AutoConfigurationCustomizer
addSpanProcessorCustomizer
(BiFunction<? super SpanProcessor, ConfigProperties, ? extends SpanProcessor> spanProcessorCustomizer) Adds aBiFunction
to invoke for all autoconfiguredSpanProcessor
.default AutoConfigurationCustomizer
addTracerProviderCustomizer
(BiFunction<SdkTracerProviderBuilder, ConfigProperties, SdkTracerProviderBuilder> tracerProviderCustomizer) Adds aBiFunction
to invoke the with theSdkTracerProviderBuilder
to allow customization.
-
Method Details
-
addPropagatorCustomizer
AutoConfigurationCustomizer addPropagatorCustomizer(BiFunction<? super TextMapPropagator, ConfigProperties, ? extends TextMapPropagator> propagatorCustomizer) Adds aBiFunction
to invoke with the default autoconfiguredTextMapPropagator
to allow customization. The return value of theBiFunction
will replace the passed-in argument.Multiple calls will execute the customizers in order.
-
addResourceCustomizer
AutoConfigurationCustomizer addResourceCustomizer(BiFunction<? super Resource, ConfigProperties, ? extends Resource> resourceCustomizer) Adds aBiFunction
to invoke with the default autoconfiguredResource
to allow customization. The return value of theBiFunction
will replace the passed-in argument.Multiple calls will execute the customizers in order.
-
addSamplerCustomizer
AutoConfigurationCustomizer addSamplerCustomizer(BiFunction<? super Sampler, ConfigProperties, ? extends Sampler> samplerCustomizer) Adds aBiFunction
to invoke with the default autoconfiguredSampler
to allow customization. The return value of theBiFunction
will replace the passed-in argument.Multiple calls will execute the customizers in order.
-
addSpanExporterCustomizer
AutoConfigurationCustomizer addSpanExporterCustomizer(BiFunction<? super SpanExporter, ConfigProperties, ? extends SpanExporter> exporterCustomizer) Adds aBiFunction
to invoke with the default autoconfiguredSpanExporter
to allow customization. The return value of theBiFunction
will replace the passed-in argument.Multiple calls will execute the customizers in order.
-
addSpanProcessorCustomizer
default AutoConfigurationCustomizer addSpanProcessorCustomizer(BiFunction<? super SpanProcessor, ConfigProperties, ? extends SpanProcessor> spanProcessorCustomizer) Adds aBiFunction
to invoke for all autoconfiguredSpanProcessor
. The return value of theBiFunction
will replace the passed-in argument. In contrast toaddSpanExporterCustomizer(BiFunction)
this allows modifications to happen before batching occurs. As a result, it is possible to efficiently filter spans, add artificial spans or delay spans for enhancing them with external, delayed data.Multiple calls will execute the customizers in order.
- Since:
- 1.33.0
-
addPropertiesSupplier
Adds aSupplier
of a map of property names and values to use as defaults for theConfigProperties
used during auto-configuration. The order of precedence of properties is system properties > environment variables > the suppliers registered with this method.Multiple calls will cause properties to be merged in order, with later ones overwriting duplicate keys in earlier ones.
-
addPropertiesCustomizer
default AutoConfigurationCustomizer addPropertiesCustomizer(Function<ConfigProperties, Map<String, String>> propertiesCustomizer) Adds aFunction
to invoke the with theConfigProperties
to allow customization. The return value of theFunction
will be merged into theConfigProperties
before it is used for auto-configuration, overwriting the properties that are already there.Multiple calls will cause properties to be merged in order, with later ones overwriting duplicate keys in earlier ones.
- Since:
- 1.17.0
-
addTracerProviderCustomizer
default AutoConfigurationCustomizer addTracerProviderCustomizer(BiFunction<SdkTracerProviderBuilder, ConfigProperties, SdkTracerProviderBuilder> tracerProviderCustomizer) Adds aBiFunction
to invoke the with theSdkTracerProviderBuilder
to allow customization. The return value of theBiFunction
will replace the passed-in argument.Multiple calls will execute the customizers in order.
Note: calling
SdkTracerProviderBuilder.setSampler(Sampler)
inside of your configuration function will cause any sampler customizers to be ignored that were configured viaaddSamplerCustomizer(BiFunction)
. If you want to replace the default sampler, check outConfigurableSamplerProvider
and useaddPropertiesSupplier(Supplier)
to set `otel.traces.sampler` to your named sampler.Similarly, calling
SdkTracerProviderBuilder.setResource(Resource)
inside of your configuration function will cause any resource customizers to be ignored that were configured viaaddResourceCustomizer(BiFunction)
. -
addMeterProviderCustomizer
default AutoConfigurationCustomizer addMeterProviderCustomizer(BiFunction<SdkMeterProviderBuilder, ConfigProperties, SdkMeterProviderBuilder> meterProviderCustomizer) Adds aBiFunction
to invoke the with theSdkMeterProviderBuilder
to allow customization. The return value of theBiFunction
will replace the passed-in argument.Multiple calls will execute the customizers in order.
-
addMetricExporterCustomizer
default AutoConfigurationCustomizer addMetricExporterCustomizer(BiFunction<? super MetricExporter, ConfigProperties, ? extends MetricExporter> exporterCustomizer) Adds aBiFunction
to invoke with the default autoconfiguredMetricExporter
to allow customization. The return value of theBiFunction
will replace the passed-in argument.Multiple calls will execute the customizers in order.
-
addMetricReaderCustomizer
default AutoConfigurationCustomizer addMetricReaderCustomizer(BiFunction<? super MetricReader, ConfigProperties, ? extends MetricReader> readerCustomizer) Adds aBiFunction
to invoke with the autoconfiguredMetricReader
to allow customization. The return value of theBiFunction
will replace the passed-in argument.Multiple calls will execute the customizers in order.
- Since:
- 1.36.0
-
addLoggerProviderCustomizer
default AutoConfigurationCustomizer addLoggerProviderCustomizer(BiFunction<SdkLoggerProviderBuilder, ConfigProperties, SdkLoggerProviderBuilder> loggerProviderCustomizer) Adds aBiFunction
to invoke the with theSdkLoggerProviderBuilder
to allow customization. The return value of theBiFunction
will replace the passed-in argument.Multiple calls will execute the customizers in order.
- Since:
- 1.19.0
-
addLogRecordExporterCustomizer
default AutoConfigurationCustomizer addLogRecordExporterCustomizer(BiFunction<? super LogRecordExporter, ConfigProperties, ? extends LogRecordExporter> exporterCustomizer) Adds aBiFunction
to invoke with the default autoconfiguredLogRecordExporter
to allow customization. The return value of theBiFunction
will replace the passed-in argument.Multiple calls will execute the customizers in order.
- Since:
- 1.19.0
-
addLogRecordProcessorCustomizer
default AutoConfigurationCustomizer addLogRecordProcessorCustomizer(BiFunction<? super LogRecordProcessor, ConfigProperties, ? extends LogRecordProcessor> logRecordProcessorCustomizer) Adds aBiFunction
to invoke for all autoconfiguredLogRecordProcessor
s. The return value of theBiFunction
will replace the passed-in argument. In contrast toaddLogRecordExporterCustomizer(BiFunction)
(BiFunction)} this allows modifications to happen before batching occurs. As a result, it is possible to efficiently filter logs, add artificial logs or delay logs for enhancing them with external, delayed data.Multiple calls will execute the customizers in order.
- Since:
- 1.33.0
-