Skip to content

perf(orchestration,subagent): add tracing instrumentation to LLM-bound async paths#3865

Merged
bug-ops merged 1 commit into
mainfrom
3850-tracing-instrumentation
May 13, 2026
Merged

perf(orchestration,subagent): add tracing instrumentation to LLM-bound async paths#3865
bug-ops merged 1 commit into
mainfrom
3850-tracing-instrumentation

Conversation

@bug-ops
Copy link
Copy Markdown
Owner

@bug-ops bug-ops commented May 13, 2026

Summary

  • Add #[tracing::instrument] spans to LlmPlanner::plan, LlmPlanner::plan_with_hint, and LlmAggregator::aggregate in zeph-orchestration
  • Add #[tracing::instrument] spans to SubAgentManager::spawn, SubAgentManager::collect, SubAgentManager::shutdown_all, run_agent_loop, and run_turn in zeph-subagent
  • All spans follow the <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 — clean
  • cargo clippy --workspace -- -D warnings — no warnings
  • cargo +nightly fmt --check — clean
  • cargo nextest run --workspace --lib --bins — 9305 tests passed

Closes #3850, #3851

@github-actions github-actions Bot added documentation Improvements or additions to documentation rust Rust code changes performance Performance improvements size/S Small PR (11-50 lines) labels May 13, 2026
@bug-ops bug-ops enabled auto-merge (squash) May 13, 2026 11:59
@bug-ops bug-ops force-pushed the 3850-tracing-instrumentation branch from 3c26eda to d3e1873 Compare May 13, 2026 12:06
…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
@bug-ops bug-ops force-pushed the 3850-tracing-instrumentation branch from d3e1873 to b1769d6 Compare May 13, 2026 12:12
@bug-ops bug-ops merged commit 343d3d7 into main May 13, 2026
32 checks passed
@bug-ops bug-ops deleted the 3850-tracing-instrumentation branch May 13, 2026 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation performance Performance improvements rust Rust code changes size/S Small PR (11-50 lines)

Projects

None yet

1 participant