GenerationSpanData
type GenerationSpanData = SpanDataBase & object;Type Declaration
Section titled “Type Declaration”input?
Section titled “input?”input?: Record<string, any>[];model?
Section titled “model?”model?: string;model_config?
Section titled “model_config?”model_config?: Record<string, any>;output?
Section titled “output?”output?: Record<string, any>[];tools?
Section titled “tools?”tools?: Record<string, any>[];Tool definitions offered to the model, including handoffs. Chat Completions captures these for processors when sensitive data is enabled. The OpenAI tracing exporter omits them from hosted ingest.
type: "generation";usage?
Section titled “usage?”usage?: GenerationUsageData;Usage fields are intentionally flexible in agents-core tracing.
Exporters are responsible for backend-specific mapping and validation.
For example, the OpenAI tracing exporter in @openai/agents-openai keeps
top-level generation usage to input_tokens and output_tokens for OpenAI
traces ingest, and maps additional usage fields under usage.details.
Third-party exporters can choose their own usage schema and transformation
strategy.