Class OpenTelemetryOptions
-
- All Implemented Interfaces:
public final class OpenTelemetryOptionsThe
openTelemetryclient option.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classOpenTelemetryOptions.BuilderA builder for OpenTelemetryOptions.
-
Method Summary
Modifier and Type Method Description final Optional<TracerProvider>tracerProvider()The tracer provider that creates the client's spans, in place of the one registered with GlobalOpenTelemetry. final Booleanpropagation()Whether the client's requests carry the trace context of their span, in the headers of the propagator registered with GlobalOpenTelemetry. final OpenTelemetryTracestraces()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.BuildertoBuilder()Booleanequals(Object other)IntegerhashCode()StringtoString()final static OpenTelemetryOptionsnone()Returns an instance of OpenTelemetryOptions with every option at its default. final static OpenTelemetryOptions.Builderbuilder()Returns a mutable builder for constructing an instance of OpenTelemetryOptions. final static OpenTelemetryOptionsofEnabled(Boolean enabled)Returns options that only set whether the client emits spans: traces with OpenTelemetryTraces.enabled set to enabled. final static OpenTelemetryOptionsfromEnv()Returns options based on system properties and environment variables. -
-
Method Detail
-
tracerProvider
final Optional<TracerProvider> tracerProvider()
The tracer provider that creates the client's spans, in place of the one registered with GlobalOpenTelemetry.
-
propagation
final 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 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.
-
toBuilder
final OpenTelemetryOptions.Builder toBuilder()
-
none
final static OpenTelemetryOptions none()
Returns an instance of OpenTelemetryOptions with every option at its default.
-
builder
final static OpenTelemetryOptions.Builder builder()
Returns a mutable builder for constructing an instance of OpenTelemetryOptions.
-
ofEnabled
final static OpenTelemetryOptions ofEnabled(Boolean enabled)
Returns options that only set whether the client emits spans: traces with OpenTelemetryTraces.enabled set to enabled.
-
fromEnv
final static OpenTelemetryOptions fromEnv()
Returns options based on system properties and environment variables.
The values are case-insensitive, and any other value selects the default. System properties take precedence over environment variables.
-
-
-
-