feat(rq): Support span streaming#6493
1 issue
find-bugs: Found 1 issue (1 medium)
Medium
`job.func_name` accessed unguarded in span attributes after being protected by `capture_internal_exceptions` - `sentry_sdk/integrations/rq.py:92`
The SPANDATA.CODE_FUNCTION_NAME attribute accesses job.func_name a second time outside of capture_internal_exceptions, so if job.func_name raises (the same reason it's wrapped above), the exception propagates unhandled and the span is never started, leaving rv unassigned. Use the already-resolved span_name value instead.
Also found at:
sentry_sdk/integrations/rq.py:5
⏱ 10m 35s · 1.4M in / 64.6k out · $1.96
Annotations
Check warning on line 92 in sentry_sdk/integrations/rq.py
sentry-warden / warden: find-bugs
`job.func_name` accessed unguarded in span attributes after being protected by `capture_internal_exceptions`
The `SPANDATA.CODE_FUNCTION_NAME` attribute accesses `job.func_name` a second time outside of `capture_internal_exceptions`, so if `job.func_name` raises (the same reason it's wrapped above), the exception propagates unhandled and the span is never started, leaving `rv` unassigned. Use the already-resolved `span_name` value instead.
Check warning on line 5 in sentry_sdk/integrations/rq.py
sentry-warden / warden: find-bugs
[APL-K5M] `job.func_name` accessed unguarded in span attributes after being protected by `capture_internal_exceptions` (additional location)
The `SPANDATA.CODE_FUNCTION_NAME` attribute accesses `job.func_name` a second time outside of `capture_internal_exceptions`, so if `job.func_name` raises (the same reason it's wrapped above), the exception propagates unhandled and the span is never started, leaving `rv` unassigned. Use the already-resolved `span_name` value instead.