ref(asyncio): Migrate integration to span-first#6198
Draft
ericapisani wants to merge 2 commits intomasterfrom
Draft
ref(asyncio): Migrate integration to span-first#6198ericapisani wants to merge 2 commits intomasterfrom
ericapisani wants to merge 2 commits intomasterfrom
Conversation
Update the asyncio integration to use sentry_sdk.traces.start_span() when span streaming is enabled, storing op and origin as span attributes instead of top-level fields. Add span_streaming parametrization to test_create_task to cover both the legacy static path and the new streaming path, asserting on segment and span structure in each mode. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
Codecov Results 📊✅ 13 passed | Total: 13 | Pass Rate: 100% | Execution Time: 8.72s 📊 Comparison with Base Branch
✨ No test changes detected All tests are passing successfully. ❌ Patch coverage is 0.00%. Project has 14956 uncovered lines. Files with missing lines (1)
Coverage diff@@ Coverage Diff @@
## main #PR +/-##
==========================================
- Coverage 31.38% 31.36% -0.02%
==========================================
Files 190 190 —
Lines 21780 21790 +10
Branches 7294 7298 +4
==========================================
+ Hits 6834 6834 —
- Misses 14946 14956 +10
- Partials 578 578 —Generated by Codecov Action |
Member
Author
|
bugbot run |
Member
Author
|
@sentry review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit cdaa63a. Configure here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Migrates the asyncio integration to support the span-first (streaming) trace lifecycle alongside the existing static transaction-based approach.
The integration now uses
StreamedSpanwhentrace_lifecycle: "stream"is enabled, and falls back to the existingSpan-based behavior otherwise. Tests are parametrized to cover both modes.Fixes PY-2304
Fixes #6002