Interface AutoConfigurationCustomizer
-
- All Known Implementing Classes:
AutoConfiguredOpenTelemetrySdkBuilder
public interface AutoConfigurationCustomizerA builder for customizing OpenTelemetry auto-configuration.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default AutoConfigurationCustomizeraddLoggerProviderCustomizer(java.util.function.BiFunction<SdkLoggerProviderBuilder,ConfigProperties,SdkLoggerProviderBuilder> loggerProviderCustomizer)Adds aBiFunctionto invoke the with theSdkLoggerProviderBuilderto allow customization.default AutoConfigurationCustomizeraddLogRecordExporterCustomizer(java.util.function.BiFunction<? super LogRecordExporter,ConfigProperties,? extends LogRecordExporter> exporterCustomizer)Adds aBiFunctionto invoke with the default autoconfiguredLogRecordExporterto allow customization.default AutoConfigurationCustomizeraddLogRecordProcessorCustomizer(java.util.function.BiFunction<? super LogRecordProcessor,ConfigProperties,? extends LogRecordProcessor> logRecordProcessorCustomizer)Adds aBiFunctionto invoke for all autoconfiguredLogRecordProcessors.default AutoConfigurationCustomizeraddMeterProviderCustomizer(java.util.function.BiFunction<SdkMeterProviderBuilder,ConfigProperties,SdkMeterProviderBuilder> meterProviderCustomizer)Adds aBiFunctionto invoke the with theSdkMeterProviderBuilderto allow customization.default AutoConfigurationCustomizeraddMetricExporterCustomizer(java.util.function.BiFunction<? super MetricExporter,ConfigProperties,? extends MetricExporter> exporterCustomizer)Adds aBiFunctionto invoke with the default autoconfiguredMetricExporterto allow customization.default AutoConfigurationCustomizeraddMetricReaderCustomizer(java.util.function.BiFunction<? super MetricReader,ConfigProperties,? extends MetricReader> readerCustomizer)Adds aBiFunctionto invoke with the autoconfiguredMetricReaderto allow customization.AutoConfigurationCustomizeraddPropagatorCustomizer(java.util.function.BiFunction<? super TextMapPropagator,ConfigProperties,? extends TextMapPropagator> propagatorCustomizer)Adds aBiFunctionto invoke with the default autoconfiguredTextMapPropagatorto allow customization.default AutoConfigurationCustomizeraddPropertiesCustomizer(java.util.function.Function<ConfigProperties,java.util.Map<java.lang.String,java.lang.String>> propertiesCustomizer)Adds aFunctionto invoke the with theConfigPropertiesto allow customization.AutoConfigurationCustomizeraddPropertiesSupplier(java.util.function.Supplier<java.util.Map<java.lang.String,java.lang.String>> propertiesSupplier)Adds aSupplierof a map of property names and values to use as defaults for theConfigPropertiesused during auto-configuration.AutoConfigurationCustomizeraddResourceCustomizer(java.util.function.BiFunction<? super Resource,ConfigProperties,? extends Resource> resourceCustomizer)Adds aBiFunctionto invoke with the default autoconfiguredResourceto allow customization.AutoConfigurationCustomizeraddSamplerCustomizer(java.util.function.BiFunction<? super Sampler,ConfigProperties,? extends Sampler> samplerCustomizer)Adds aBiFunctionto invoke with the default autoconfiguredSamplerto allow customization.AutoConfigurationCustomizeraddSpanExporterCustomizer(java.util.function.BiFunction<? super SpanExporter,ConfigProperties,? extends SpanExporter> exporterCustomizer)Adds aBiFunctionto invoke with the default autoconfiguredSpanExporterto allow customization.default AutoConfigurationCustomizeraddSpanProcessorCustomizer(java.util.function.BiFunction<? super SpanProcessor,ConfigProperties,? extends SpanProcessor> spanProcessorCustomizer)Adds aBiFunctionto invoke for all autoconfiguredSpanProcessor.default AutoConfigurationCustomizeraddTracerProviderCustomizer(java.util.function.BiFunction<SdkTracerProviderBuilder,ConfigProperties,SdkTracerProviderBuilder> tracerProviderCustomizer)Adds aBiFunctionto invoke the with theSdkTracerProviderBuilderto allow customization.
-
-
-
Method Detail
-
addPropagatorCustomizer
AutoConfigurationCustomizer addPropagatorCustomizer(java.util.function.BiFunction<? super TextMapPropagator,ConfigProperties,? extends TextMapPropagator> propagatorCustomizer)
Adds aBiFunctionto invoke with the default autoconfiguredTextMapPropagatorto allow customization. The return value of theBiFunctionwill replace the passed-in argument.Multiple calls will execute the customizers in order.
-
addResourceCustomizer
AutoConfigurationCustomizer addResourceCustomizer(java.util.function.BiFunction<? super Resource,ConfigProperties,? extends Resource> resourceCustomizer)
Adds aBiFunctionto invoke with the default autoconfiguredResourceto allow customization. The return value of theBiFunctionwill replace the passed-in argument.Multiple calls will execute the customizers in order.
-
addSamplerCustomizer
AutoConfigurationCustomizer addSamplerCustomizer(java.util.function.BiFunction<? super Sampler,ConfigProperties,? extends Sampler> samplerCustomizer)
Adds aBiFunctionto invoke with the default autoconfiguredSamplerto allow customization. The return value of theBiFunctionwill replace the passed-in argument.Multiple calls will execute the customizers in order.
-
addSpanExporterCustomizer
AutoConfigurationCustomizer addSpanExporterCustomizer(java.util.function.BiFunction<? super SpanExporter,ConfigProperties,? extends SpanExporter> exporterCustomizer)
Adds aBiFunctionto invoke with the default autoconfiguredSpanExporterto allow customization. The return value of theBiFunctionwill replace the passed-in argument.Multiple calls will execute the customizers in order.
-
addSpanProcessorCustomizer
default AutoConfigurationCustomizer addSpanProcessorCustomizer(java.util.function.BiFunction<? super SpanProcessor,ConfigProperties,? extends SpanProcessor> spanProcessorCustomizer)
Adds aBiFunctionto invoke for all autoconfiguredSpanProcessor. The return value of theBiFunctionwill 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
AutoConfigurationCustomizer addPropertiesSupplier(java.util.function.Supplier<java.util.Map<java.lang.String,java.lang.String>> propertiesSupplier)
Adds aSupplierof a map of property names and values to use as defaults for theConfigPropertiesused 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(java.util.function.Function<ConfigProperties,java.util.Map<java.lang.String,java.lang.String>> propertiesCustomizer)
Adds aFunctionto invoke the with theConfigPropertiesto allow customization. The return value of theFunctionwill be merged into theConfigPropertiesbefore 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(java.util.function.BiFunction<SdkTracerProviderBuilder,ConfigProperties,SdkTracerProviderBuilder> tracerProviderCustomizer)
Adds aBiFunctionto invoke the with theSdkTracerProviderBuilderto allow customization. The return value of theBiFunctionwill 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 outConfigurableSamplerProviderand 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(java.util.function.BiFunction<SdkMeterProviderBuilder,ConfigProperties,SdkMeterProviderBuilder> meterProviderCustomizer)
Adds aBiFunctionto invoke the with theSdkMeterProviderBuilderto allow customization. The return value of theBiFunctionwill replace the passed-in argument.Multiple calls will execute the customizers in order.
-
addMetricExporterCustomizer
default AutoConfigurationCustomizer addMetricExporterCustomizer(java.util.function.BiFunction<? super MetricExporter,ConfigProperties,? extends MetricExporter> exporterCustomizer)
Adds aBiFunctionto invoke with the default autoconfiguredMetricExporterto allow customization. The return value of theBiFunctionwill replace the passed-in argument.Multiple calls will execute the customizers in order.
-
addMetricReaderCustomizer
default AutoConfigurationCustomizer addMetricReaderCustomizer(java.util.function.BiFunction<? super MetricReader,ConfigProperties,? extends MetricReader> readerCustomizer)
Adds aBiFunctionto invoke with the autoconfiguredMetricReaderto allow customization. The return value of theBiFunctionwill replace the passed-in argument.Multiple calls will execute the customizers in order.
- Since:
- 1.36.0
-
addLoggerProviderCustomizer
default AutoConfigurationCustomizer addLoggerProviderCustomizer(java.util.function.BiFunction<SdkLoggerProviderBuilder,ConfigProperties,SdkLoggerProviderBuilder> loggerProviderCustomizer)
Adds aBiFunctionto invoke the with theSdkLoggerProviderBuilderto allow customization. The return value of theBiFunctionwill replace the passed-in argument.Multiple calls will execute the customizers in order.
- Since:
- 1.19.0
-
addLogRecordExporterCustomizer
default AutoConfigurationCustomizer addLogRecordExporterCustomizer(java.util.function.BiFunction<? super LogRecordExporter,ConfigProperties,? extends LogRecordExporter> exporterCustomizer)
Adds aBiFunctionto invoke with the default autoconfiguredLogRecordExporterto allow customization. The return value of theBiFunctionwill replace the passed-in argument.Multiple calls will execute the customizers in order.
- Since:
- 1.19.0
-
addLogRecordProcessorCustomizer
default AutoConfigurationCustomizer addLogRecordProcessorCustomizer(java.util.function.BiFunction<? super LogRecordProcessor,ConfigProperties,? extends LogRecordProcessor> logRecordProcessorCustomizer)
Adds aBiFunctionto invoke for all autoconfiguredLogRecordProcessors. The return value of theBiFunctionwill 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
-
-