ref(openai-agents): Remove error attributes #5986
2 issues
High
set_span_errored called with wrong number of arguments causing TypeError at runtime - `sentry_sdk/integrations/openai_agents/patches/agent_run.py:11`
The import changed from _record_exception_on_span to set_span_errored, but set_span_errored in tracing_utils.py only accepts one optional parameter (span). However, line 160 in this file calls set_span_errored(span, exc) with two arguments. This will cause a TypeError: set_span_errored() takes at most 1 argument (2 given) when an exception is raised in _run_single_turn_streamed.
Also found at:
sentry_sdk/integrations/openai_agents/patches/agent_run.py:160
set_span_errored called with incompatible signature causes TypeError - `sentry_sdk/integrations/openai_agents/patches/agent_run.py:11`
The import change replaces _record_exception_on_span with set_span_errored, but set_span_errored(span, exc) is called at line 160 with two arguments while the function only accepts one parameter (span). This will raise a TypeError: set_span_errored() takes 1 positional argument but 2 were given at runtime when an exception occurs during streaming.
Also found at:
sentry_sdk/integrations/openai_agents/patches/agent_run.py:160
4 skills analyzed
| Skill | Findings | Duration | Cost |
|---|---|---|---|
| code-review | 1 | 2m 4s | $2.21 |
| find-bugs | 1 | 2m 33s | $2.65 |
| skill-scanner | 0 | 3m 13s | $0.43 |
| security-review | 0 | 2m 43s | $1.41 |
Duration: 10m 32s · Tokens: 3.7M in / 36.6k out · Cost: $6.72 (+extraction: $0.01, +merge: $0.00, +dedup: $0.00)