Class TracerSharedState
java.lang.Object
io.opentelemetry.sdk.trace.TracerSharedState
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final SpanProcessorprivate final Clockprivate final IdGeneratorprivate final booleanprivate final Objectprivate final Resourceprivate final Samplerprivate CompletableResultCodeprivate final Supplier<SpanLimits> -
Constructor Summary
ConstructorsConstructorDescriptionTracerSharedState(Clock clock, IdGenerator idGenerator, Resource resource, Supplier<SpanLimits> spanLimitsSupplier, Sampler sampler, List<SpanProcessor> spanProcessors) -
Method Summary
Modifier and TypeMethodDescription(package private) SpanProcessorReturns the activeSpanProcessor.(package private) ClockgetClock()(package private) IdGenerator(package private) Resource(package private) SamplerReturns the configuredSampler.(package private) SpanLimitsReturns the currentSpanLimits.(package private) booleanReturnstrueif tracing has been shut down.(package private) boolean(package private) CompletableResultCodeshutdown()Stops tracing, including shutting down processors and set totruehasBeenShutdown().
-
Field Details
-
lock
-
clock
-
idGenerator
-
idGeneratorSafeToSkipIdValidation
private final boolean idGeneratorSafeToSkipIdValidation -
resource
-
spanLimitsSupplier
-
sampler
-
activeSpanProcessor
-
shutdownResult
-
-
Constructor Details
-
TracerSharedState
TracerSharedState(Clock clock, IdGenerator idGenerator, Resource resource, Supplier<SpanLimits> spanLimitsSupplier, Sampler sampler, List<SpanProcessor> spanProcessors)
-
-
Method Details
-
getClock
Clock getClock() -
getIdGenerator
IdGenerator getIdGenerator() -
isIdGeneratorSafeToSkipIdValidation
boolean isIdGeneratorSafeToSkipIdValidation() -
getResource
Resource getResource() -
getSpanLimits
SpanLimits getSpanLimits()Returns the currentSpanLimits. -
getSampler
-
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.
-