getsentry / getsentry/sentry-python

Instrument `Agent.iter()` with `invoke_agent` span

Đang mở
#5,835 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
Improvement Python Spans
Ngôn ngữ chính
Python
Star
2.2k
Fork
669
Merge trung bình
1 ngày 1 giờ
Pull request đã merge (30 ngày)
213

Mô tả

`Agent.iter()` is a public API for step-by-step agent iteration that does NOT call `Agent.run()`, so currently no `invoke_agent` span is created. Inner model calls still get `gen_ai.chat` spans via the `ModelRequestNode` patch, but without the parent agent span.

This should be patched similarly to `Agent.run_stream()` — wrapping the async context manager to create an `invoke_agent` span and push/pop the agent context.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.