getsentry / getsentry/sentry-python
Instrument `Agent.iter()` with `invoke_agent` span
オープン
Improvement
Python
Spans
- 主要言語
- Python
- スター
- 2.2k
- フォーク
- 669
- 平均マージ
- 1日 1時間
- マージ済み PR(30日)
- 213
説明
`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.
コントリビューションガイド
評価
この issue はまだ評価されていません。