Skip to content

Add reasoning effort to turn tracing spans#20060

Merged
charley-openai merged 1 commit into
mainfrom
dev/charley/turn-reasoning-effort-tracing
May 4, 2026
Merged

Add reasoning effort to turn tracing spans#20060
charley-openai merged 1 commit into
mainfrom
dev/charley/turn-reasoning-effort-tracing

Conversation

@charley-openai
Copy link
Copy Markdown
Contributor

@charley-openai charley-openai commented Apr 28, 2026

Why
#19432 added token usage to the turn and response spans. This follow-up adds the configured reasoning effort so performance traces can be filtered by model effort.

example trace
Screenshot 2026-04-28 at 3 52 12 PM

What Changed

  • Adds codex.turn.reasoning_effort to the turn span.
  • Adds codex.request.reasoning_effort to handle_responses.
  • Extends the span test to cover explicit high effort with token usage.

Testing

  • cargo test -p codex-core turn_and_completed_response_spans_record_token_usage
  • cargo test -p codex-otel
  • just fmt
  • just fix -p codex-core
  • just fix -p codex-otel

@charley-openai charley-openai force-pushed the dev/charley/turn-reasoning-effort-tracing branch 2 times, most recently from 3b4b4e3 to 5add64f Compare April 28, 2026 19:57
@charley-openai charley-openai requested a review from jif-oai April 28, 2026 19:59
@charley-openai charley-openai marked this pull request as ready for review April 28, 2026 19:59
@charley-openai charley-openai requested a review from a team as a code owner April 28, 2026 19:59
@charley-openai charley-openai force-pushed the dev/charley/turn-reasoning-effort-tracing branch 2 times, most recently from 646293f to 99b39b6 Compare April 29, 2026 00:18
Comment thread codex-rs/core/src/tasks/mod.rs
Comment thread codex-rs/core/tests/suite/otel.rs Outdated
@charley-openai charley-openai force-pushed the dev/charley/turn-reasoning-effort-tracing branch from 99b39b6 to b7ae9f4 Compare April 29, 2026 17:28
@charley-openai charley-openai requested a review from jif-oai April 29, 2026 20:43
Copy link
Copy Markdown
Collaborator

@jif-oai jif-oai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok after my comment

Comment thread codex-rs/core/src/tasks/mod.rs Outdated
@charley-openai charley-openai force-pushed the dev/charley/turn-reasoning-effort-tracing branch from b7ae9f4 to 8ed4c78 Compare May 4, 2026 18:27
@charley-openai charley-openai merged commit a6599b8 into main May 4, 2026
26 checks passed
@charley-openai charley-openai deleted the dev/charley/turn-reasoning-effort-tracing branch May 4, 2026 19:57
@github-actions github-actions Bot locked and limited conversation to collaborators May 4, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants