configureOpenTelemetrySdk

fun configureOpenTelemetrySdk(exporterConfig: BaseExporterConfig, additionalResource: Resource = Resource.create( Attributes.of(AttributeKey.stringKey("service.name"), "unknown-service") )): OpenTelemetrySdk(source)

Initializes the OpenTelemetrySdk using a provided BaseExporterConfig.

This method sets up a SdkTracerProvider with:

Return

the initialized OpenTelemetrySdk instance.

Parameters

exporterConfig

the exporter configuration defining how spans should be exported. Examples include:

additionalResource

optional extra Resource attributes merged with the default OpenTelemetry resource. Use this to set values such as "service.name"