Class OpenTelemetryConfiguration

  • All Implemented Interfaces:

    
    public final class OpenTelemetryConfiguration
    
                        

    Type-safe config DSL that controls how OpenTelemetry should behave.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private Clock clock
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Constructor Detail

    • Method Detail

      • getClock

         final Clock getClock()

        Configures the Clock used for capturing telemetry.

      • setClock

         final Unit setClock(Clock clock)

        Configures the Clock used for capturing telemetry.

      • disableTracing

         final Unit disableTracing()

        Disable tracing in the SDK by providing no-op implementations that don't incur overhead even if instrumentation creates spans

      • disableLogging

         final Unit disableLogging()

        Disable logging and events in the SDK by providing no-op implementations that don't incur overhead even if instrumentation emits logs

      • disableMetrics

         final Unit disableMetrics()

        Disable metrics in the SDK by providing no-op implementations that don't incur overhead even if instrumentation records metrics

      • globalAttributes

         final Unit globalAttributes(Function0<Attributes> action)

        Configures attributes that are used globally. Use this method if your attributes don't change over time.

      • globalAttributesSupplier

         final Unit globalAttributesSupplier(Function0<Function0<Attributes>> action)

        Configures attributes that are used globally. Use this method to supply attributes that might change over time.

      • resource

         final Unit resource(Function1<ResourceBuilder, Unit> action)

        Configures the resource attributes that are used globally by acting on a ResourceBuilder.