Skip to content

feat(asgi): Migrate away from event processor in span first#5920

Draft
sentrivana wants to merge 3 commits intomasterfrom
ivana/migrate-asgi-event-processor
Draft

feat(asgi): Migrate away from event processor in span first#5920
sentrivana wants to merge 3 commits intomasterfrom
ivana/migrate-asgi-event-processor

Conversation

@sentrivana
Copy link
Copy Markdown
Contributor

Description

In span first, there are no event processors. Therefore, we need to be able to set the data we were setting in event processors in some other way.

As we migrate our integrations one by one, this will be an exercise in whether it's possible to achieve this without some sort of callback/lifecycle hooks. So far, in ASGI, it seems we can get by by simply using scope.set_attribute() for setting request related data, and updating the segment name/source just before the span ends.

Adding this enables us to actually test the new functionality.

Issues

Reminders

@linear-code
Copy link
Copy Markdown

linear-code bot commented Mar 30, 2026

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 30, 2026

Semver Impact of This PR

🟡 Minor (new features)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


This PR will not appear in the changelog.


🤖 This preview updates automatically when you update the PR.

1 similar comment
@github-actions
Copy link
Copy Markdown
Contributor

Semver Impact of This PR

🟡 Minor (new features)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


This PR will not appear in the changelog.


🤖 This preview updates automatically when you update the PR.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 30, 2026

Codecov Results 📊

13 passed | Total: 13 | Pass Rate: 100% | Execution Time: 8.70s

📊 Comparison with Base Branch

Metric Change
Total Tests
Passed Tests
Failed Tests
Skipped Tests

✨ No test changes detected

All tests are passing successfully.

❌ Patch coverage is 6.12%. Project has 14732 uncovered lines.
✅ Project coverage is 30.02%. Comparing base (base) to head (head).

Files with missing lines (2)
File Patch % Lines
asgi.py 15.69% ⚠️ 172 Missing
_asgi_common.py 14.49% ⚠️ 59 Missing
Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
+ Coverage    25.26%    30.02%    +4.76%
==========================================
  Files          189       189         —
  Lines        21007     21053       +46
  Branches      6862      6886       +24
==========================================
+ Hits          5306      6321     +1015
- Misses       15701     14732      -969
- Partials       432       477       +45

Generated by Codecov Action

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Event processor replacement for streamed spans

1 participant