Add spans to build_tool_router - #27094
Merged
Merged
Conversation
mchen-oai
marked this pull request as ready for review
June 9, 2026 00:35
mchen-oai
force-pushed
the
mchen/build_tool_router-spans
branch
3 times, most recently
from
June 9, 2026 02:37
129673c to
1be1a5c
Compare
This was referenced Jun 9, 2026
mchen-oai
force-pushed
the
mchen/build_tool_router-spans
branch
from
June 9, 2026 14:19
1be1a5c to
e4b0f97
Compare
owenlin0
reviewed
Jun 9, 2026
Merged
owenlin0
approved these changes
Jun 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
append_tool_search_executoraverages ~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.build_tool_routerand 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, andbuild_model_visible_specs_and_registryVerification
Trigger Codex rollout and observe new spans are included