---
type: email
from: Kazuhiro Sera <notifications@github.com>
subject: [openai/openai-agents-python] fix: #260 sanitize oversized tracing

 span payloads (PR #2549)
received: 2026-03-06 07:05:39
priority: high
status: awaiting_approval
---

## Email Content
This pull request resolves #260 by sanitizing oversized `span_data.input` and `span_data.output` fields before the SDK posts spans to the default OpenAI traces ingest endpoint. Large string fields are truncated to stay within the ingest byte limit, while oversized structured payloads are reduced without breaking the expected OpenAI trace shape, so generation spans with nested inputs such as base64 audio blobs still ingest successfully.



The change is intentionally scoped to the built-in OpenAI tracing exporter and does not change custom endpoint behavior or the public tracing API. It also keeps the existing generation usage sanitization, preserves efficient string truncation, and safely handles values that are not JSON-serializable.



This pull request also expands `tests/test_trace_pro...

## Suggested Actions
- [ ] Reply
- [ ] Archive
- [ ] Flag for review
