Class AutoConfiguredOpenTelemetrySdk
java.lang.Object
io.opentelemetry.sdk.autoconfigure.AutoConfiguredOpenTelemetrySdk
- Direct Known Subclasses:
AutoValue_AutoConfiguredOpenTelemetrySdk
An auto-configured OpenTelemetry SDK. As an alternative to programmatically configuring the SDK
using
OpenTelemetrySdk.builder()
, this package can be used to automatically configure the
SDK using environment properties specified by OpenTelemetry.- Since:
- 1.28.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Returns a newAutoConfiguredOpenTelemetrySdkBuilder
which can be used to customize auto-configuration behavior.(package private) static AutoConfiguredOpenTelemetrySdk
create
(OpenTelemetrySdk sdk, Resource resource, ConfigProperties config, StructuredConfigProperties structuredConfigProperties) (package private) abstract ConfigProperties
Returns theConfigProperties
used for auto-configuration, ornull
if declarative configuration was used.abstract OpenTelemetrySdk
Returns theOpenTelemetrySdk
that was auto-configured, or an effectively noop instance if the SDK has been disabled.(package private) abstract Resource
Returns theResource
that was auto-configured.(package private) abstract StructuredConfigProperties
Returns theStructuredConfigProperties
used for auto-configuration, ornull
if declarative configuration was not used.Returns anAutoConfiguredOpenTelemetrySdk
automatically initialized through recognized system properties and environment variables.
-
Constructor Details
-
AutoConfiguredOpenTelemetrySdk
AutoConfiguredOpenTelemetrySdk()
-
-
Method Details
-
initialize
Returns anAutoConfiguredOpenTelemetrySdk
automatically initialized through recognized system properties and environment variables.This will automatically set the resulting SDK as the
GlobalOpenTelemetry
instance. -
builder
Returns a newAutoConfiguredOpenTelemetrySdkBuilder
which can be used to customize auto-configuration behavior. -
create
static AutoConfiguredOpenTelemetrySdk create(OpenTelemetrySdk sdk, Resource resource, @Nullable ConfigProperties config, @Nullable StructuredConfigProperties structuredConfigProperties) -
getOpenTelemetrySdk
Returns theOpenTelemetrySdk
that was auto-configured, or an effectively noop instance if the SDK has been disabled.The instance returned if the SDK is disabled is equivalent to
OpenTelemetrySdk.builder().build()
, which is notably not the same asOpenTelemetry.noop()
. -
getResource
Returns theResource
that was auto-configured. -
getConfig
Returns theConfigProperties
used for auto-configuration, ornull
if declarative configuration was used.- See Also:
-
getStructuredConfig
Returns theStructuredConfigProperties
used for auto-configuration, ornull
if declarative configuration was not used.- See Also:
-