Class OpenTelemetrySdkAutoConfiguration


  • public final class OpenTelemetrySdkAutoConfiguration
    extends Object
    Auto-configuration for the 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.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static io.opentelemetry.sdk.OpenTelemetrySdk initialize()
      Returns an OpenTelemetrySdk automatically initialized through recognized system properties and environment variables.
      static io.opentelemetry.sdk.OpenTelemetrySdk initialize​(boolean setResultAsGlobal)
      Returns an OpenTelemetrySdk automatically initialized through recognized system properties and environment variables.
      static io.opentelemetry.sdk.OpenTelemetrySdk initialize​(boolean setResultAsGlobal, io.opentelemetry.sdk.autoconfigure.spi.ConfigProperties config)
      Returns an OpenTelemetrySdk automatically initialized through recognized properties contained in the config parameter.
    • Method Detail

      • initialize

        public static io.opentelemetry.sdk.OpenTelemetrySdk initialize()
        Returns an OpenTelemetrySdk automatically initialized through recognized system properties and environment variables.

        This will automatically set the resulting SDK as the GlobalOpenTelemetry instance.

      • initialize

        public static io.opentelemetry.sdk.OpenTelemetrySdk initialize​(boolean setResultAsGlobal)
        Returns an OpenTelemetrySdk automatically initialized through recognized system properties and environment variables.
        Parameters:
        setResultAsGlobal - Whether to automatically set the configured SDK as the GlobalOpenTelemetry instance.
      • initialize

        public static io.opentelemetry.sdk.OpenTelemetrySdk initialize​(boolean setResultAsGlobal,
                                                                       io.opentelemetry.sdk.autoconfigure.spi.ConfigProperties config)
        Returns an OpenTelemetrySdk automatically initialized through recognized properties contained in the config parameter.
        Parameters:
        setResultAsGlobal - Whether to automatically set the configured SDK as the GlobalOpenTelemetry instance.
        config - A ConfigProperties instance that contains properties that are to be used to auto-configure the returned OpenTelemetrySdk.