feat(rq): Support span streaming#6493
Conversation
Codecov Results 📊✅ 88540 passed | ⏭️ 6025 skipped | Total: 94565 | Pass Rate: 93.63% | Execution Time: 298m 47s 📊 Comparison with Base Branch
All tests are passing successfully. ✅ Patch coverage is 92.59%. Project has 2475 uncovered lines. Files with missing lines (1)
Coverage diff@@ Coverage Diff @@
## main #PR +/-##
==========================================
+ Coverage 89.38% 89.38% —%
==========================================
Files 192 192 —
Lines 23285 23302 +17
Branches 8002 8010 +8
==========================================
+ Hits 20811 20827 +16
- Misses 2474 2475 +1
- Partials 1309 1311 +2Generated by Codecov Action |
| (span,) = ( | ||
| span | ||
| for span in spans | ||
| if span["attributes"].get("sentry.op") == "queue.task.rq" |
There was a problem hiding this comment.
Do we need to perform this filtering here? Or can we pull the last element off of spans via index access or .pop?
There was a problem hiding this comment.
The tests failed in CI when I used a fixed index here.
The span list also includes spans from redis-py. Either the order is non-deterministic or there's differences across versions.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 2e1a8c1. Configure here.

Description
In the streaming path, use
messaging.message.idinstead of therq-job.job_idextracode.function.nameinstead of therq-job.funcextraExtras not set as attributes
rq-job.argsrq-job.kwargsrq-job.descriptionrq-job.enqueued_atrq-job.started_atAdapting Tests
sedcommands used for converting transaction context managers:sedcommands used for converting event capture:sedcommands used for convertingop:sedcommands used for converting origin:Issues
Closes #6053
Reminders
uv run ruff.feat:,fix:,ref:,meta:)