Interface SpanContext


public interface SpanContext
Context of a tracing Span.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    asParent(Span.Builder<?> spanBuilder)
    Configure this context as a parent of the provided builder.
    Returns the baggage extractable from the span context.
    Span ID of the associated span.
    Trace ID of the associated span.
  • Method Details

    • traceId

      String traceId()
      Trace ID of the associated span.
      Returns:
      trace id
    • spanId

      String spanId()
      Span ID of the associated span.
      Returns:
      span id
    • asParent

      void asParent(Span.Builder<?> spanBuilder)
      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

      Baggage baggage()
      Returns the baggage extractable from the span context.
      Returns:
      Baggage instance; empty if no baggage is available from the span context