Package io.opentelemetry.sdk.trace
Class TracerSharedState
- java.lang.Object
-
- io.opentelemetry.sdk.trace.TracerSharedState
-
final class TracerSharedState extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private SpanProcessor
activeSpanProcessor
private Clock
clock
private IdGenerator
idGenerator
private boolean
idGeneratorSafeToSkipIdValidation
private java.lang.Object
lock
private Resource
resource
private Sampler
sampler
private CompletableResultCode
shutdownResult
private java.util.function.Supplier<SpanLimits>
spanLimitsSupplier
-
Constructor Summary
Constructors Constructor Description TracerSharedState(Clock clock, IdGenerator idGenerator, Resource resource, java.util.function.Supplier<SpanLimits> spanLimitsSupplier, Sampler sampler, java.util.List<SpanProcessor> spanProcessors)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) SpanProcessor
getActiveSpanProcessor()
Returns the activeSpanProcessor
.(package private) Clock
getClock()
(package private) IdGenerator
getIdGenerator()
(package private) Resource
getResource()
(package private) Sampler
getSampler()
Returns the configuredSampler
.(package private) SpanLimits
getSpanLimits()
Returns the currentSpanLimits
.(package private) boolean
hasBeenShutdown()
Returnstrue
if tracing has been shut down.(package private) boolean
isIdGeneratorSafeToSkipIdValidation()
(package private) CompletableResultCode
shutdown()
Stops tracing, including shutting down processors and set totrue
hasBeenShutdown()
.
-
-
-
Field Detail
-
lock
private final java.lang.Object lock
-
clock
private final Clock clock
-
idGenerator
private final IdGenerator idGenerator
-
idGeneratorSafeToSkipIdValidation
private final boolean idGeneratorSafeToSkipIdValidation
-
resource
private final Resource resource
-
spanLimitsSupplier
private final java.util.function.Supplier<SpanLimits> spanLimitsSupplier
-
sampler
private final Sampler sampler
-
activeSpanProcessor
private final SpanProcessor activeSpanProcessor
-
shutdownResult
@Nullable private volatile CompletableResultCode shutdownResult
-
-
Constructor Detail
-
TracerSharedState
TracerSharedState(Clock clock, IdGenerator idGenerator, Resource resource, java.util.function.Supplier<SpanLimits> spanLimitsSupplier, Sampler sampler, java.util.List<SpanProcessor> spanProcessors)
-
-
Method Detail
-
getClock
Clock getClock()
-
getIdGenerator
IdGenerator getIdGenerator()
-
isIdGeneratorSafeToSkipIdValidation
boolean isIdGeneratorSafeToSkipIdValidation()
-
getResource
Resource getResource()
-
getSpanLimits
SpanLimits getSpanLimits()
Returns the currentSpanLimits
.
-
getActiveSpanProcessor
SpanProcessor getActiveSpanProcessor()
Returns the activeSpanProcessor
.- Returns:
- the active
SpanProcessor
.
-
hasBeenShutdown
boolean hasBeenShutdown()
Returnstrue
if tracing has been shut down.- Returns:
true
if tracing has been shut down.
-
shutdown
CompletableResultCode shutdown()
Stops tracing, including shutting down processors and set totrue
hasBeenShutdown()
.- Returns:
- a
CompletableResultCode
that will be completed when the span processor is shut down.
-
-