Skip to content

feat(tornado): Support span streaming - #6206

Merged
sl0thentr0py merged 6 commits into
masterfrom
neel/span-first/tornado
May 18, 2026
Merged

feat(tornado): Support span streaming#6206
sl0thentr0py merged 6 commits into
masterfrom
neel/span-first/tornado

Conversation

@sl0thentr0py

Copy link
Copy Markdown
Member

Issues

@sl0thentr0py
sl0thentr0py requested a review from a team as a code ownerMay 5, 2026 13:32
@linear-code

Copy link
Copy Markdown

@sl0thentr0pysl0thentr0py changed the title ref(tornado): migrate to span-firstref(tornado): migrate to span firstMay 5, 2026
@github-actions

github-actionsBot commented May 5, 2026

Copy link
Copy Markdown
Contributor

Codecov Results 📊

282 passed | Total: 282 | Pass Rate: 100% | Execution Time: 43.61s

All tests are passing successfully.

❌ Patch coverage is 19.12%. Project has 14835 uncovered lines.

Files with missing lines (2)
FilePatch %Lines
tornado.py10.91%⚠️ 147 Missing
consts.py99.50%⚠️ 2 Missing

Generated by Codecov Action

@sl0thentr0pysl0thentr0py changed the title ref(tornado): migrate to span firstfeat(tornado): Support span streamingMay 5, 2026

@alexander-alderman-webbalexander-alderman-webb left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment not blocking, looks good to me!

Comment threadsentry_sdk/integrations/tornado.py Outdated
Comment threadtests/integrations/tornado/test_tornado.py Outdated
Comment threadtests/integrations/tornado/test_tornado.py Outdated
Comment threadsentry_sdk/integrations/tornado.py
Comment threadsentry_sdk/integrations/tornado.py Outdated
Comment threadsentry_sdk/integrations/tornado.py Outdated
Comment threadsentry_sdk/integrations/tornado.py
Comment threadsentry_sdk/integrations/tornado.py
@sl0thentr0py
sl0thentr0pyforce-pushed the neel/span-first/tornado branch from 82de412 to a58538dCompareMay 7, 2026 13:05
Comment threadsentry_sdk/integrations/tornado.py
Comment threadsentry_sdk/integrations/tornado.py Outdated
Comment threadsentry_sdk/integrations/tornado.py
@sl0thentr0py
sl0thentr0pyforce-pushed the neel/span-first/tornado branch from 036b60a to 4f36419CompareMay 15, 2026 12:34
Comment threadsentry_sdk/integrations/tornado.py Outdated
Comment threadsentry_sdk/integrations/tornado.py Outdated
Comment threadsentry_sdk/integrations/tornado.py
@sl0thentr0py
sl0thentr0pyforce-pushed the neel/span-first/tornado branch 3 times, most recently from 4d430e9 to 2106ec2CompareMay 15, 2026 13:06
@sl0thentr0py
sl0thentr0pyforce-pushed the neel/span-first/tornado branch 3 times, most recently from e390c87 to ec6fd01CompareMay 15, 2026 13:14
Comment threadsentry_sdk/integrations/tornado.py Outdated

@cursorcursorBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 1fa438a. Configure here.

Comment threadsentry_sdk/integrations/tornado.py
@sl0thentr0py
sl0thentr0pyforce-pushed the neel/span-first/tornado branch from 4d4e44e to 4c597a4CompareMay 15, 2026 13:52
Comment threadsentry_sdk/integrations/tornado.py
Comment threadsentry_sdk/integrations/tornado.py Outdated
Comment threadsentry_sdk/integrations/tornado.py Outdated
Comment threadsentry_sdk/integrations/tornado.py
Comment threadsentry_sdk/integrations/tornado.py
def test_transactions(tornado_testcase, sentry_init, capture_events, handler, code):
sentry_init(integrations=[TornadoIntegration()], traces_sample_rate=1.0)
events = capture_events()
def test_transactions(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is now testing both segments and transactions, this test name should be updated

@sl0thentr0pysl0thentr0pyMay 18, 2026

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what should I update it to instead? I took wsgi tests as a reference and they're still called transactions

@sentrivanasentrivana left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Add span-streaming support to the Tornado integration. When span
streaming is enabled, the request handler emits a StreamedSpan with
HTTP request attributes (method, headers, query, URL, client address)
and sets the response status on completion. The legacy transaction
path is preserved for non-streaming mode.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@sl0thentr0py
sl0thentr0pyforce-pushed the neel/span-first/tornado branch from 4c597a4 to ee5bfeeCompareMay 18, 2026 12:07
Comment threadsentry_sdk/integrations/tornado.py
@sl0thentr0py
sl0thentr0py enabled auto-merge (squash) May 18, 2026 12:27
@sl0thentr0py
sl0thentr0pyforce-pushed the neel/span-first/tornado branch from f76454c to ef0a5f9CompareMay 18, 2026 12:33
Comment threadsentry_sdk/integrations/tornado.py
@sl0thentr0py
sl0thentr0py merged commit b4658eb into masterMay 18, 2026
156 checks passed
@sl0thentr0py
sl0thentr0py deleted the neel/span-first/tornado branch May 18, 2026 12:47
mgaligniana pushed a commit to mgaligniana/sentry-python that referenced this pull request Aug 9, 2026
#### Issues
* resolves: getsentry#6067
* resolves: PY-2369
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate tornado to span first

4 participants

@sl0thentr0py@ericapisani@sentrivana@alexander-alderman-webb