Class OpenTelemetryConfiguration
-
- All Implemented Interfaces:
public final class OpenTelemetryConfigurationType-safe config DSL that controls how OpenTelemetry should behave.
-
-
Field Summary
Fields Modifier and Type Field Description private Clockclock
-
Method Summary
Modifier and Type Method Description final ClockgetClock()Configures the Clock used for capturing telemetry. final UnitsetClock(Clock clock)Configures the Clock used for capturing telemetry. final UnitdisableTracing()Disable tracing in the SDK by providing no-op implementations that don't incur overhead even if instrumentation creates spans final UnitdisableLogging()Disable logging and events in the SDK by providing no-op implementations that don't incur overhead even if instrumentation emits logs final UnitdisableMetrics()Disable metrics in the SDK by providing no-op implementations that don't incur overhead even if instrumentation records metrics final UnithttpExport(Function1<HttpExportConfiguration, Unit> action)Configures how OpenTelemetry should export telemetry over HTTP. final Unitinstrumentations(Function1<InstrumentationConfiguration, Unit> action)Configures individual instrumentations. final UnitsemanticConventions(Function1<SemanticConventionsConfiguration, Unit> action)Configures semantic conventions. final Unitsession(Function1<SessionConfiguration, Unit> action)Configures session behavior. final UnitglobalAttributes(Function0<Attributes> action)Configures attributes that are used globally. final UnitglobalAttributesSupplier(Function0<Function0<Attributes>> action)Configures attributes that are used globally. final UnitdiskBuffering(Function1<DiskBufferingConfigurationSpec, Unit> action)Configures disk buffering behavior of exported telemetry. final Unitresource(Function1<ResourceBuilder, Unit> action)Configures the resource attributes that are used globally by acting on a ResourceBuilder. -
-
Method Detail
-
getClock
final Clock getClock()
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
-
httpExport
final Unit httpExport(Function1<HttpExportConfiguration, Unit> action)
Configures how OpenTelemetry should export telemetry over HTTP.
-
instrumentations
final Unit instrumentations(Function1<InstrumentationConfiguration, Unit> action)
Configures individual instrumentations.
-
semanticConventions
final Unit semanticConventions(Function1<SemanticConventionsConfiguration, Unit> action)
Configures semantic conventions.
-
session
final Unit session(Function1<SessionConfiguration, Unit> action)
Configures session behavior.
-
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.
-
diskBuffering
final Unit diskBuffering(Function1<DiskBufferingConfigurationSpec, Unit> action)
Configures disk buffering behavior of exported telemetry.
-
-
-
-