Class OpenTelemetrySdkAutoConfiguration
- java.lang.Object
-
- io.opentelemetry.sdk.autoconfigure.OpenTelemetrySdkAutoConfiguration
-
public final class OpenTelemetrySdkAutoConfiguration extends Object
Auto-configuration for the OpenTelemetry SDK. As an alternative to programmatically configuring the SDK usingOpenTelemetrySdk.builder(), this package can be used to automatically configure the SDK using environment properties specified by OpenTelemetry.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static io.opentelemetry.sdk.OpenTelemetrySdkinitialize()Returns anOpenTelemetrySdkautomatically initialized through recognized system properties and environment variables.static io.opentelemetry.sdk.OpenTelemetrySdkinitialize(boolean setResultAsGlobal)Returns anOpenTelemetrySdkautomatically initialized through recognized system properties and environment variables.static io.opentelemetry.sdk.OpenTelemetrySdkinitialize(boolean setResultAsGlobal, io.opentelemetry.sdk.autoconfigure.spi.ConfigProperties config)Returns anOpenTelemetrySdkautomatically initialized through recognized properties contained in theconfigparameter.
-
-
-
Method Detail
-
initialize
public static io.opentelemetry.sdk.OpenTelemetrySdk initialize()
Returns anOpenTelemetrySdkautomatically initialized through recognized system properties and environment variables.This will automatically set the resulting SDK as the
GlobalOpenTelemetryinstance.
-
initialize
public static io.opentelemetry.sdk.OpenTelemetrySdk initialize(boolean setResultAsGlobal)
Returns anOpenTelemetrySdkautomatically initialized through recognized system properties and environment variables.- Parameters:
setResultAsGlobal- Whether to automatically set the configured SDK as theGlobalOpenTelemetryinstance.
-
initialize
public static io.opentelemetry.sdk.OpenTelemetrySdk initialize(boolean setResultAsGlobal, io.opentelemetry.sdk.autoconfigure.spi.ConfigProperties config)Returns anOpenTelemetrySdkautomatically initialized through recognized properties contained in theconfigparameter.- Parameters:
setResultAsGlobal- Whether to automatically set the configured SDK as theGlobalOpenTelemetryinstance.config- AConfigPropertiesinstance that contains properties that are to be used to auto-configure the returnedOpenTelemetrySdk.
-
-