11---
22title : Configure the SDK
33linkTitle : Configure the SDK
4- weight : 12
4+ weight : 13
55aliases : [config]
66# prettier-ignore
77cSpell:ignore : authservice autoconfigured blrp Customizer Dotel ignore LOWMEMORY myservice ottrace PKCS retryable tracepropagators
@@ -11,7 +11,7 @@ cSpell:ignore: authservice autoconfigured blrp Customizer Dotel ignore LOWMEMORY
1111<? code-excerpt path-base="examples/java/configuration"?>
1212
1313The [ SDK] ( ../sdk/ ) is the built-in reference implementation of the
14- [ API] ( ../instrumentation / ) , processing and exporting telemetry produced by
14+ [ API] ( ../api-components / ) , processing and exporting telemetry produced by
1515instrumentation API calls. Configuring the SDK to process and export
1616appropriately is an essential step to integrating OpenTelemetry into an
1717application.
@@ -361,36 +361,36 @@ import java.util.Collections;
361361public class CustomizedAutoConfiguredSdk {
362362 public static OpenTelemetrySdk autoconfiguredSdk () {
363363 return AutoConfiguredOpenTelemetrySdk . builder()
364- // Optionally customize TextMapPropagator.
365- .addPropagatorCustomizer((textMapPropagator, configProperties) - > textMapPropagator)
366- // Optionally customize Resource.
367- .addResourceCustomizer((resource, configProperties) - > resource)
368- // Optionally customize Sampler.
369- .addSamplerCustomizer((sampler, configProperties) - > sampler)
370- // Optionally customize SpanExporter.
371- .addSpanExporterCustomizer((spanExporter, configProperties) - > spanExporter)
372- // Optionally customize SpanProcessor.
373- .addSpanProcessorCustomizer((spanProcessor, configProperties) - > spanProcessor)
374- // Optionally supply additional properties.
375- .addPropertiesSupplier(Collections :: emptyMap)
376- // Optionally customize ConfigProperties.
377- .addPropertiesCustomizer(configProperties - > Collections . emptyMap())
378- // Optionally customize SdkTracerProviderBuilder.
379- .addTracerProviderCustomizer((builder, configProperties) - > builder)
380- // Optionally customize SdkMeterProviderBuilder.
381- .addMeterProviderCustomizer((builder, configProperties) - > builder)
382- // Optionally customize MetricExporter.
383- .addMetricExporterCustomizer((metricExporter, configProperties) - > metricExporter)
384- // Optionally customize MetricReader.
385- .addMetricReaderCustomizer((metricReader, configProperties) - > metricReader)
386- // Optionally customize SdkLoggerProviderBuilder.
387- .addLoggerProviderCustomizer((builder, configProperties) - > builder)
388- // Optionally customize LogRecordExporter.
389- .addLogRecordExporterCustomizer((logRecordExporter, configProperties) - > logRecordExporter)
390- // Optionally customize LogRecordProcessor.
391- .addLogRecordProcessorCustomizer((processor, configProperties) - > processor)
392- .build()
393- .getOpenTelemetrySdk();
364+ // Optionally customize TextMapPropagator.
365+ .addPropagatorCustomizer((textMapPropagator, configProperties) - > textMapPropagator)
366+ // Optionally customize Resource.
367+ .addResourceCustomizer((resource, configProperties) - > resource)
368+ // Optionally customize Sampler.
369+ .addSamplerCustomizer((sampler, configProperties) - > sampler)
370+ // Optionally customize SpanExporter.
371+ .addSpanExporterCustomizer((spanExporter, configProperties) - > spanExporter)
372+ // Optionally customize SpanProcessor.
373+ .addSpanProcessorCustomizer((spanProcessor, configProperties) - > spanProcessor)
374+ // Optionally supply additional properties.
375+ .addPropertiesSupplier(Collections :: emptyMap)
376+ // Optionally customize ConfigProperties.
377+ .addPropertiesCustomizer(configProperties - > Collections . emptyMap())
378+ // Optionally customize SdkTracerProviderBuilder.
379+ .addTracerProviderCustomizer((builder, configProperties) - > builder)
380+ // Optionally customize SdkMeterProviderBuilder.
381+ .addMeterProviderCustomizer((builder, configProperties) - > builder)
382+ // Optionally customize MetricExporter.
383+ .addMetricExporterCustomizer((metricExporter, configProperties) - > metricExporter)
384+ // Optionally customize MetricReader.
385+ .addMetricReaderCustomizer((metricReader, configProperties) - > metricReader)
386+ // Optionally customize SdkLoggerProviderBuilder.
387+ .addLoggerProviderCustomizer((builder, configProperties) - > builder)
388+ // Optionally customize LogRecordExporter.
389+ .addLogRecordExporterCustomizer((logRecordExporter, configProperties) - > logRecordExporter)
390+ // Optionally customize LogRecordProcessor.
391+ .addLogRecordProcessorCustomizer((processor, configProperties) - > processor)
392+ .build()
393+ .getOpenTelemetrySdk();
394394 }
395395}
396396```
0 commit comments