콘텐츠로 이동

GenerationSpanData

이 콘텐츠는 아직 번역되지 않았습니다.

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