Description
Codex spans have real boundaries from item_completed and a server-issued trace id. Claude Code spans are bounded by record write times and are approximate. Both are worth having and the difference has to be visible on the span, not just in a doc.
Acceptance Criteria
- #1 Span tree is session, turn, response, item, with sub-agent turns linked as children
- #2 Codex uses its native trace id with codingagent.trace_id_source native; Claude derives one and labels it derived
- #3 Every span carries codingagent.duration_source
- #4 Tool call and tool result spans are linked by call id, with occurrence disambiguating a reused id
- #5 Content and identifiers are span attributes, never metric attributes
- #6 traces.sample_ratio is honoured
Definition of Done
- #1 just check passes: fmt-check, lint, build, test-short, probe-ci, dashboard-check and docs-links all clean
Implementation Plan
Wave 1 lane 10: implement the documented OTLP span tree from the frozen model with mandatory duration and trace provenance; root integrates and runs the final gate.
Final Summary
The sampled OTLP trace tree, native/derived trace identity, provenance and call linking are implemented; Tempo trace c0a80f7a338e9552c8972036e043b955 contains 33,467 spans.