Interface SpanData

All Known Implementing Classes:
AgentSpanData, CustomSpanData, FunctionSpanData, GenerationSpanData, GuardrailSpanData, HandoffSpanData

Base interface for all span data types.

Sealed interface ensures type safety and exhaustive pattern matching. Each span type captures different operation metadata.

Ported from TypeScript OpenAI Agents SDK Source: tracing/spans.ts

  • Method Summary

    Modifier and Type
    Method
    Description
    Get the span type identifier.
  • Method Details

    • getType

      String getType()
      Get the span type identifier. Used for serialization and type discrimination.
      Returns:
      Span type (e.g., "agent", "generation", "function")