perf(orchestration,subagent): add tracing instrumentation to LLM-bound async paths#3865
Merged
Conversation
3c26eda to
d3e1873
Compare
…d async paths Add #[tracing::instrument] spans to all primary LLM-bound async functions in zeph-orchestration and zeph-subagent so they appear in local Chrome JSON traces and Perfetto analysis. zeph-orchestration: - LlmPlanner::plan (orchestration.planner.plan, fields: goal_len) - LlmPlanner::plan_with_hint (orchestration.planner.plan_with_hint, fields: goal_len) - LlmAggregator::aggregate (orchestration.aggregator.aggregate, fields: task_count) zeph-subagent: - SubAgentManager::spawn (subagent.manager.spawn, fields: def_name) - SubAgentManager::collect (subagent.manager.collect, fields: task_id) - SubAgentManager::shutdown_all (subagent.manager.shutdown_all) - run_agent_loop (subagent.agent_loop.run, fields: task_id, agent_name) - run_turn (subagent.agent_loop.run_turn, fields: task_id, turn) Closes #3850, #3851
d3e1873 to
b1769d6
Compare
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
#[tracing::instrument]spans toLlmPlanner::plan,LlmPlanner::plan_with_hint, andLlmAggregator::aggregateinzeph-orchestration#[tracing::instrument]spans toSubAgentManager::spawn,SubAgentManager::collect,SubAgentManager::shutdown_all,run_agent_loop, andrun_turninzeph-subagent<subsystem>.<component>.<operation>naming convention and include relevant fields (goal_len,task_count,def_name,task_id,turn)Test plan
cargo build -p zeph-orchestration -p zeph-subagent— cleancargo clippy --workspace -- -D warnings— no warningscargo +nightly fmt --check— cleancargo nextest run --workspace --lib --bins— 9305 tests passedCloses #3850, #3851