feat(ops): P0-4 Tracing - OPS_CHAT_TRACER + trace_span for deep/react - #231
Merged
Conversation
- api/ops/tracing.py: add OPS_CHAT_TRACER env switch (langfuse/langsmith/none), keep LANGFUSE_TRACING/LANGSMITH_TRACING backward compat, add trace_span ctx mgr. - api/ops/orchestrator/core.py: add run_id/agent_role=deep metadata, wrap handoff/review in trace_span. - api/ops/react_loop.py: add run_id/agent_role=react metadata, wrap handoff/review in trace_span. - tests/ops/test_tracing.py: 12 tests covering no-op, OPS_CHAT_TRACER switches, mock langfuse/langsmith span creation, run_deep/react span metadata. - Invokes for 30 execute and 40 self-check.
独立复检 + 全局验收落盘;建议合并,阻塞项无。
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
Tick the box to add this pull request to the merge queue (same as
|
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.
P0-4 Tracing implementation.\n\n- OPS_CHAT_TRACER env switch (langfuse/langsmith/none)\n- trace_span context manager with zero-cost no-op default\n- run_id/session_id/agent_role metadata in deep/ReAct entry\n- handoff/review hot-path spans\n- 12 tracing unit tests\n\nVerification: pytest 282 passed, 10 skipped; ruff green.
CI 状态(自动 · pr-post-ci)
Required 全绿:否
变更范围(自动统计)
文件数:11
docs/api/tests/.python-versionrequirements.txt⚠ automerge 路径闸:含
api/、tests/、.github/workflows/等 — 勿打automerge或须人审 merge。命中路径
api/ops/orchestrator/core.pyapi/ops/react_loop.pyapi/ops/tracing.pytests/ops/test_chat_context.pytests/ops/test_tracing.py