Interface AutoConfigurationCustomizer
-
Method Summary
Modifier and TypeMethodDescriptiondefault AutoConfigurationCustomizeraddLoggerProviderCustomizer(BiFunction<io.opentelemetry.sdk.logs.SdkLoggerProviderBuilder, ConfigProperties, io.opentelemetry.sdk.logs.SdkLoggerProviderBuilder> meterProviderCustomizer) Adds aBiFunctionto invoke the with theSdkLoggerProviderBuilderto allow customization.default AutoConfigurationCustomizeraddLogRecordExporterCustomizer(BiFunction<? super io.opentelemetry.sdk.logs.export.LogRecordExporter, ConfigProperties, ? extends io.opentelemetry.sdk.logs.export.LogRecordExporter> exporterCustomizer) Adds aBiFunctionto invoke with the default autoconfiguredLogRecordExporterto allow customization.default AutoConfigurationCustomizeraddMeterProviderCustomizer(BiFunction<io.opentelemetry.sdk.metrics.SdkMeterProviderBuilder, ConfigProperties, io.opentelemetry.sdk.metrics.SdkMeterProviderBuilder> meterProviderCustomizer) Adds aBiFunctionto invoke the with theSdkMeterProviderBuilderto allow customization.default AutoConfigurationCustomizeraddMetricExporterCustomizer(BiFunction<? super io.opentelemetry.sdk.metrics.export.MetricExporter, ConfigProperties, ? extends io.opentelemetry.sdk.metrics.export.MetricExporter> exporterCustomizer) Adds aBiFunctionto invoke with the default autoconfiguredMetricExporterto allow customization.addPropagatorCustomizer(BiFunction<? super io.opentelemetry.context.propagation.TextMapPropagator, ConfigProperties, ? extends io.opentelemetry.context.propagation.TextMapPropagator> propagatorCustomizer) Adds aBiFunctionto invoke with the default autoconfiguredTextMapPropagatorto allow customization.default AutoConfigurationCustomizeraddPropertiesCustomizer(Function<ConfigProperties, Map<String, String>> propertiesCustomizer) Adds aFunctionto invoke the with theConfigPropertiesto allow customization.addPropertiesSupplier(Supplier<Map<String, String>> propertiesSupplier) Adds aSupplierof a map of property names and values to use as defaults for theConfigPropertiesused during auto-configuration.addResourceCustomizer(BiFunction<? super io.opentelemetry.sdk.resources.Resource, ConfigProperties, ? extends io.opentelemetry.sdk.resources.Resource> resourceCustomizer) Adds aBiFunctionto invoke with the default autoconfiguredResourceto allow customization.addSamplerCustomizer(BiFunction<? super io.opentelemetry.sdk.trace.samplers.Sampler, ConfigProperties, ? extends io.opentelemetry.sdk.trace.samplers.Sampler> samplerCustomizer) Adds aBiFunctionto invoke with the default autoconfiguredSamplerto allow customization.addSpanExporterCustomizer(BiFunction<? super io.opentelemetry.sdk.trace.export.SpanExporter, ConfigProperties, ? extends io.opentelemetry.sdk.trace.export.SpanExporter> exporterCustomizer) Adds aBiFunctionto invoke with the default autoconfiguredSpanExporterto allow customization.default AutoConfigurationCustomizeraddTracerProviderCustomizer(BiFunction<io.opentelemetry.sdk.trace.SdkTracerProviderBuilder, ConfigProperties, io.opentelemetry.sdk.trace.SdkTracerProviderBuilder> tracerProviderCustomizer) Adds aBiFunctionto invoke the with theSdkTracerProviderBuilderto allow customization.
-
Method Details
-
addPropagatorCustomizer
AutoConfigurationCustomizer addPropagatorCustomizer(BiFunction<? super io.opentelemetry.context.propagation.TextMapPropagator, ConfigProperties, ? extends io.opentelemetry.context.propagation.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(BiFunction<? super io.opentelemetry.sdk.resources.Resource, ConfigProperties, ? extends io.opentelemetry.sdk.resources.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(BiFunction<? super io.opentelemetry.sdk.trace.samplers.Sampler, ConfigProperties, ? extends io.opentelemetry.sdk.trace.samplers.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(BiFunction<? super io.opentelemetry.sdk.trace.export.SpanExporter, ConfigProperties, ? extends io.opentelemetry.sdk.trace.export.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.
-
addPropertiesSupplier
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(Function<ConfigProperties, Map<String, 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(BiFunction<io.opentelemetry.sdk.trace.SdkTracerProviderBuilder, ConfigProperties, io.opentelemetry.sdk.trace.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(BiFunction<io.opentelemetry.sdk.metrics.SdkMeterProviderBuilder, ConfigProperties, io.opentelemetry.sdk.metrics.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(BiFunction<? super io.opentelemetry.sdk.metrics.export.MetricExporter, ConfigProperties, ? extends io.opentelemetry.sdk.metrics.export.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.
-
addLoggerProviderCustomizer
default AutoConfigurationCustomizer addLoggerProviderCustomizer(BiFunction<io.opentelemetry.sdk.logs.SdkLoggerProviderBuilder, ConfigProperties, io.opentelemetry.sdk.logs.SdkLoggerProviderBuilder> meterProviderCustomizer) 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(BiFunction<? super io.opentelemetry.sdk.logs.export.LogRecordExporter, ConfigProperties, ? extends io.opentelemetry.sdk.logs.export.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
-