Conversation
Semver Impact of This PR🟡 Minor (new features) 📋 Changelog PreviewThis is how your changes will appear in the changelog. This PR will not appear in the changelog. 🤖 This preview updates automatically when you update the PR. |
Codecov Results 📊✅ 13 passed | Total: 13 | Pass Rate: 100% | Execution Time: 7.87s All tests are passing successfully. ✅ Patch coverage is 94.59%. Project has 14719 uncovered lines. Files with missing lines (4)
Generated by Codecov Action |
| kwargs_headers = {} | ||
|
|
||
| task_name = kwargs_headers.get("task") | ||
| task_name = kwargs_headers.get("task") or "<unknown Celery task>" |
There was a problem hiding this comment.
This is used for naming the span and spans v2 must always have a name, name=None is not supported.
| self._active: bool = active | ||
| self._attributes: "Attributes" = {} | ||
| self._attributes: "Attributes" = { | ||
| "sentry.origin": "manual", |
There was a problem hiding this comment.
This was an oversight in the core logic -- we were never setting sentry.origin for custom instrumentation
| self._transaction_info["source"] = str( | ||
| span._attributes["sentry.span.source"] |
There was a problem hiding this comment.
If you're wondering what the str() is doing here, the answer is mypy 😎 😭
alexander-alderman-webb
left a comment
There was a problem hiding this comment.
Nice! Just one optional suggestion.
Co-authored-by: Alex Alderman Webb <alexander.webb@sentry.io>
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 7a8ced2. Configure here.

Description
Support streaming mode in the Celery integration.
This is the first integration that contains explicit guards against creating certain spans as segments, mirroring how
start_spanworks currently -- it won't create a span if there's no transaction. In Celery, there were multiple spots that, if we just replaced all legacystart_spans with the newtraces.start_span, would've created new segment spans, leading to a change in behavior.Best viewed with
Hide whitespace😎Issues