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 SpanProcessoractiveSpanProcessorprivate Clockclockprivate IdGeneratoridGeneratorprivate booleanidGeneratorSafeToSkipIdValidationprivate java.lang.Objectlockprivate Resourceresourceprivate Samplersamplerprivate CompletableResultCodeshutdownResultprivate 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) SpanProcessorgetActiveSpanProcessor()Returns the activeSpanProcessor.(package private) ClockgetClock()(package private) IdGeneratorgetIdGenerator()(package private) ResourcegetResource()(package private) SamplergetSampler()Returns the configuredSampler.(package private) SpanLimitsgetSpanLimits()Returns the currentSpanLimits.(package private) booleanhasBeenShutdown()Returnstrueif tracing has been shut down.(package private) booleanisIdGeneratorSafeToSkipIdValidation()(package private) CompletableResultCodeshutdown()Stops tracing, including shutting down processors and set totruehasBeenShutdown().
-
-
-
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()
Returnstrueif tracing has been shut down.- Returns:
trueif tracing has been shut down.
-
shutdown
CompletableResultCode shutdown()
Stops tracing, including shutting down processors and set totruehasBeenShutdown().- Returns:
- a
CompletableResultCodethat will be completed when the span processor is shut down.
-
-