Interface TraceContext.Builder

Enclosing interface:
TraceContext

public static interface TraceContext.Builder
Builder for TraceContext.
Since:
3.1.0
  • Method Details

    • traceId

      TraceContext.Builder traceId(String traceId)
      Sets trace id on the trace context.
      Parameters:
      traceId - trace id
      Returns:
      this
    • parentId

      TraceContext.Builder parentId(String parentId)
      Sets parent id on the trace context.
      Parameters:
      parentId - parent trace id
      Returns:
      this
    • spanId

      TraceContext.Builder spanId(String spanId)
      Sets span id on the trace context.
      Parameters:
      spanId - span id
      Returns:
      this
    • sampled

      TraceContext.Builder sampled(Boolean sampled)
      Sets sampled on the trace context.
      Parameters:
      sampled - if span is sampled
      Returns:
      this
    • build

      TraceContext build()
      Builds the trace context.
      Returns:
      trace context