Interface SpanContext
public interface SpanContext
Context of a tracing
Span.-
Method Summary
Modifier and TypeMethodDescriptionvoidasParent(Span.Builder<?> spanBuilder) Configure this context as a parent of the provided builder.baggage()Returns the baggage extractable from the span context.default booleansampled()Whether the associated span is sampled.spanId()Span ID of the associated span.traceId()Trace ID of the associated span.
-
Method Details
-
traceId
-
spanId
-
sampled
default boolean sampled()Whether the associated span is sampled. Implementations should override this method to report the tracer's sampling decision. The default returnstruefor compatibility with existing implementations.- Returns:
- whether the span is sampled
-
asParent
Configure this context as a parent of the provided builder.- Parameters:
spanBuilder- span builder to update, it will be a child of this span context
-
baggage
-