ref(openai-agents): Remove error attributes #5986
1 issue
find-bugs: Found 1 issue (1 high)
High
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
Duration: 2m 33s · Tokens: 1.7M in / 14.3k out · Cost: $2.66 (+extraction: $0.01, +merge: $0.00)
Annotations
Check failure on line 11 in sentry_sdk/integrations/openai_agents/patches/agent_run.py
sentry-warden / warden: find-bugs
set_span_errored called with incompatible signature causes TypeError
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.
Check failure on line 160 in sentry_sdk/integrations/openai_agents/patches/agent_run.py
sentry-warden / warden: find-bugs
[EXU-XWG] set_span_errored called with incompatible signature causes TypeError (additional location)
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.