Interface Context.Builder

All Superinterfaces:
Buildable, CopyableBuilder<Context.Builder,Context>, SdkBuilder<Context.Builder,Context>, SdkPojo
Enclosing class:
Context

@Mutable @NotThreadSafe public static interface Context.Builder extends SdkPojo, CopyableBuilder<Context.Builder,Context>
  • Method Details

    • spanContext

      Context.Builder spanContext(SpanContext spanContext)

      The span context information that uniquely identifies the trace and span being evaluated, including session ID, trace ID, and span ID for precise targeting within the agent's execution flow.

      Parameters:
      spanContext - The span context information that uniquely identifies the trace and span being evaluated, including session ID, trace ID, and span ID for precise targeting within the agent's execution flow.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • spanContext

      default Context.Builder spanContext(Consumer<SpanContext.Builder> spanContext)

      The span context information that uniquely identifies the trace and span being evaluated, including session ID, trace ID, and span ID for precise targeting within the agent's execution flow.

      This is a convenience method that creates an instance of the SpanContext.Builder avoiding the need to create one manually via SpanContext.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to spanContext(SpanContext).

      Parameters:
      spanContext - a consumer that will call methods on SpanContext.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also: