sdk

val sdk: OpenTelemetrySdk(source)

Provides an instance of the OpenTelemetrySdk.

This property retrieves the existing instance of the SDK if it has already been initialized. If the SDK has not been initialized, it initializes a new instance with the specified service name and service version. The initialized SDK instance is cached for future access.

The initializeOpenTelemetry function configures the SDK with the appropriate service attributes, trace providers, span processors, and exporters. It also ensures proper shutdown of the SDK on application termination.

Return

The initialized or previously cached OpenTelemetrySdk.