Interface Span.Builder

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

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

    • spanId

      Span.Builder spanId(String spanId)

      Unique span identifier

      Parameters:
      spanId - Unique span identifier
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • assistantId

      Span.Builder assistantId(String assistantId)

      UUID of the Connect AI Assistant resource

      Parameters:
      assistantId - UUID of the Connect AI Assistant resource
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • sessionId

      Span.Builder sessionId(String sessionId)

      UUID of the Connect AI Session resource

      Parameters:
      sessionId - UUID of the Connect AI Session resource
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • parentSpanId

      Span.Builder parentSpanId(String parentSpanId)

      Parent span identifier for hierarchy. Null for root spans.

      Parameters:
      parentSpanId - Parent span identifier for hierarchy. Null for root spans.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • spanName

      Span.Builder spanName(String spanName)

      Service-defined operation name

      Parameters:
      spanName - Service-defined operation name
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • spanType

      Span.Builder spanType(String spanType)

      Operation relationship type

      Parameters:
      spanType - Operation relationship type
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • spanType

      Span.Builder spanType(SpanType spanType)

      Operation relationship type

      Parameters:
      spanType - Operation relationship type
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • startTimestamp

      Span.Builder startTimestamp(Instant startTimestamp)

      Operation start time in milliseconds since epoch

      Parameters:
      startTimestamp - Operation start time in milliseconds since epoch
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • endTimestamp

      Span.Builder endTimestamp(Instant endTimestamp)

      Operation end time in milliseconds since epoch

      Parameters:
      endTimestamp - Operation end time in milliseconds since epoch
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • status

      Span.Builder status(String status)

      Span completion status

      Parameters:
      status - Span completion status
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • status

      Span.Builder status(SpanStatus status)

      Span completion status

      Parameters:
      status - Span completion status
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • requestId

      Span.Builder requestId(String requestIdValue)

      The service request ID that initiated the operation

      Parameters:
      requestIdValue - The service request ID that initiated the operation
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • attributes

      Span.Builder attributes(SpanAttributes attributes)

      Span-specific contextual attributes

      Parameters:
      attributes - Span-specific contextual attributes
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • attributes

      default Span.Builder attributes(Consumer<SpanAttributes.Builder> attributes)

      Span-specific contextual attributes

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

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

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