コンテンツにスキップ

GenerationSpanData

このコンテンツはまだ日本語訳がありません。

type GenerationSpanData = SpanDataBase & object;
input?: Record<string, any>[];
model?: string;
model_config?: Record<string, any>;
output?: Record<string, any>[];
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?: 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.