Package io.opentelemetry.sdk.trace
Class TracerSharedState
java.lang.Object
io.opentelemetry.sdk.trace.TracerSharedState
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final SpanProcessor
private final Clock
private final IdGenerator
private final boolean
private final Object
private final Resource
private final Sampler
private CompletableResultCode
private 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) SpanProcessor
Returns the activeSpanProcessor
.(package private) Clock
getClock()
(package private) IdGenerator
(package private) Resource
(package private) Sampler
Returns the configuredSampler
.(package private) SpanLimits
Returns the currentSpanLimits
.(package private) boolean
Returnstrue
if tracing has been shut down.(package private) boolean
(package private) CompletableResultCode
shutdown()
Stops tracing, including shutting down processors and set totrue
hasBeenShutdown()
.
-
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
Sampler getSampler()Returns the configuredSampler
. -
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.
-