Skip to content

Add spans to build_tool_router - #27094

Merged
mchen-oai merged 2 commits into
mainfrom
mchen/build_tool_router-spans
Jun 10, 2026
Merged

Add spans to build_tool_router#27094
mchen-oai merged 2 commits into
mainfrom
mchen/build_tool_router-spans

Conversation

@mchen-oai

@mchen-oai mchen-oai commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Why

  • Local profiling shows append_tool_search_executor averages ~113ms per call. Adding a span lets us track this cost as we optimize in follow-up PRs, either by reducing the work or avoiding repeated rebuilds when inputs have not changed.
  • While we're here, we can add spans to build_tool_router and other sub-calls which code analysis shows may have additional opportunities for improvement.

What changed

Add function-level trace spans around build_tool_router, build_tool_specs_and_registry, add_tool_sources, append_tool_search_executor, and build_model_visible_specs_and_registry

Verification

Trigger Codex rollout and observe new spans are included

@mchen-oai
mchen-oai marked this pull request as ready for review June 9, 2026 00:35
@mchen-oai
mchen-oai requested a review from a team as a code owner June 9, 2026 00:35
@mchen-oai
mchen-oai requested a review from owenlin0 June 9, 2026 00:35
@mchen-oai
mchen-oai force-pushed the mchen/build_tool_router-spans branch 3 times, most recently from 129673c to 1be1a5c Compare June 9, 2026 02:37
@mchen-oai
mchen-oai force-pushed the mchen/build_tool_router-spans branch from 1be1a5c to e4b0f97 Compare June 9, 2026 14:19
Comment thread codex-rs/core/src/tools/spec_plan.rs Outdated
@owenlin0 owenlin0 mentioned this pull request Jun 9, 2026
@mchen-oai
mchen-oai requested a review from owenlin0 June 10, 2026 00:15
@mchen-oai
mchen-oai merged commit 5ac640a into main Jun 10, 2026
31 checks passed
@mchen-oai
mchen-oai deleted the mchen/build_tool_router-spans branch June 10, 2026 00:50
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 10, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants