Trace MCP Tool Calls

Agent tracing should answer: which server/tool was selected, with what latency, what downstream work happened, and why the run failed.

OpenAI SDK support

The current tracing module includes MCP-specific span data for tool-list operations alongside ordinary function/tool spans.

Propagate correlation IDs

Carry trace context into your MCP server and downstream HTTP/database calls using standard observability mechanisms. Avoid inventing a separate correlation system for every adapter.

Record useful metadata

Server name, tool name, duration, result status, retry count, cache hit/miss, and approval decision are usually useful. Raw access tokens are never useful trace fields.