Interface AutoConfigurationCustomizer
public interface AutoConfigurationCustomizer
A builder for customizing OpenTelemetry auto-configuration.
-
Method Summary
Modifier and TypeMethodDescriptionaddPropagatorCustomizer(BiFunction<? super io.opentelemetry.context.propagation.TextMapPropagator, ConfigProperties, ? extends io.opentelemetry.context.propagation.TextMapPropagator> propagatorCustomizer) Adds aBiFunctionto invoke with the default autoconfiguredTextMapPropagatorto 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.
-
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.
-