Files
codex/codex-rs/core/tests
Tom 47e1cf4fe4 Link startup prewarm to the first turn's OpenTelemetry trace (#65105)
## Why

Startup prewarm runs in the session startup trace, while the first turn
can run in a separate trace. The first-turn trace needs a way to show
which prewarm task it resolved, including when the wait times out.

## What changed

Record `startup_prewarm.resolve` at info level under the first-turn span.
Capture the startup prewarm span context when scheduling the task and
attach it as an OpenTelemetry span link during resolution. If the prewarm
span is filtered out, omit the link.

## Testing

Check exported spans for first-turn parentage, link behavior with the
prewarm span enabled or filtered out, and no second resolution on a
later turn. Add a regression test for retaining the link on timeout.

GitOrigin-RevId: ef4a19be64ecf145b17527081960e50adca3b92e
2026-12-01 23:11:46 +00:00
..