feat(celery): Support span streaming #6074
2 issues
High
_is_segment method accessed as property, always evaluates to truthy - `sentry_sdk/scope.py:901`
span._is_segment is a method that returns a boolean, but it's being accessed without parentheses on line 901. This means it evaluates to a bound method object, which is always truthy. As a result, all StreamedSpan instances will be treated as segments, incorrectly setting _transaction and _transaction_info for non-segment spans.
Missing parentheses: _is_segment method called as attribute, always evaluates to True - `sentry_sdk/scope.py:901`
At line 901, span._is_segment accesses the method object instead of calling it (should be span._is_segment()). Since method objects are always truthy, this condition will always evaluate to True for any StreamedSpan that isn't a NoOpStreamedSpan, completely bypassing the segment check. This will incorrectly set _transaction and _transaction_info for non-segment spans, leading to incorrect transaction linking for events.
4 skills analyzed
| Skill | Findings | Duration | Cost |
|---|---|---|---|
| code-review | 1 | 6m 31s | $2.78 |
| find-bugs | 1 | 6m 1s | $6.01 |
| skill-scanner | 0 | 5m 46s | $0.89 |
| security-review | 0 | 2m 12s | $1.02 |
Duration: 20m 30s · Tokens: 7.5M in / 69.8k out · Cost: $10.71 (+extraction: $0.01, +fix_gate: $0.01, +dedup: $0.00)