Class OpenTelemetryOptions.Builder
-
- All Implemented Interfaces:
public final class OpenTelemetryOptions.BuilderA builder for OpenTelemetryOptions.
-
-
Method Summary
Modifier and Type Method Description final OpenTelemetryOptions.BuildertracerProvider(TracerProvider tracerProvider)The tracer provider that creates the client's spans, in place of the one registered with GlobalOpenTelemetry. final OpenTelemetryOptions.BuildertracerProvider(Optional<TracerProvider> tracerProvider)Alias for calling Builder.tracerProvider with tracerProvider.orElse(null).final OpenTelemetryOptions.Builderpropagation(Boolean propagation)Whether the client's requests carry the trace context of their span, in the headers of the propagator registered with GlobalOpenTelemetry. final OpenTelemetryOptions.Buildertraces(OpenTelemetryTraces traces)The settings of the client's spans: whether it emits them, and what they hold of the content of its requests and responses. final OpenTelemetryOptions.Buildertraces(Boolean enabled)Enables or disables the client's spans. final OpenTelemetryOptionsbuild()Returns an immutable instance of OpenTelemetryOptions. -
-
Method Detail
-
tracerProvider
final OpenTelemetryOptions.Builder tracerProvider(TracerProvider tracerProvider)
The tracer provider that creates the client's spans, in place of the one registered with GlobalOpenTelemetry.
-
tracerProvider
final OpenTelemetryOptions.Builder tracerProvider(Optional<TracerProvider> tracerProvider)
Alias for calling Builder.tracerProvider with
tracerProvider.orElse(null).
-
propagation
final OpenTelemetryOptions.Builder propagation(Boolean propagation)
Whether the client's requests carry the trace context of their span, in the headers of the propagator registered with GlobalOpenTelemetry. Defaults to
true. Set it tofalsewhen an instrumentation of the HTTP client already propagates the trace context, so that a request does not carry it twice.
-
traces
final OpenTelemetryOptions.Builder traces(OpenTelemetryTraces traces)
The settings of the client's spans: whether it emits them, and what they hold of the content of its requests and responses. Defaults to spans without content.
-
traces
final OpenTelemetryOptions.Builder traces(Boolean enabled)
Enables or disables the client's spans.
A short form of traces with only OpenTelemetryTraces.enabled set to enabled.
-
build
final OpenTelemetryOptions build()
Returns an immutable instance of OpenTelemetryOptions.
Further updates to this Builder will not mutate the returned instance.
-
-
-
-