René's URL Explorer Experiment


Title: feat(httpx): Migrate to span first by ericapisani · Pull Request #6084 · getsentry/sentry-python · GitHub

Open Graph Title: feat(httpx): Migrate to span first by ericapisani · Pull Request #6084 · getsentry/sentry-python

X Title: feat(httpx): Migrate to span first by ericapisani · Pull Request #6084 · getsentry/sentry-python

Description: Migrates the httpx integration to the span-first (streaming span) architecture. When _experiments={"trace_lifecycle": "stream"} is enabled, the integration now uses StreamedSpan via sentry_sdk.traces.start_span instead of the legacy Span-based (transactions) path. The legacy path remains unchanged for backwards compatibility. Supporting changes: add_http_request_source_for_streamed_span() added to tracing_utils — a StreamedSpan-compatible variant that must be called inside the span context manager so source data is attached before the span is flushed add_source() updated to dispatch between set_data/set_attribute depending on span type start_timestamp_monotonic_ns property added to StreamedSpan and NoOpStreamedSpan to support the request source duration threshold check Part of the broader span-first integration migration. Fixes PY-2330 Fixes #6028

Open Graph Description: Migrates the httpx integration to the span-first (streaming span) architecture. When _experiments={"trace_lifecycle": "stream"} is enabled, the integration now uses StreamedSpan...

X Description: Migrates the httpx integration to the span-first (streaming span) architecture. When _experiments={"trace_lifecycle": "stream"} is enabled, the integration now u...

Opengraph URL: https://github.com/getsentry/sentry-python/pull/6084

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:93cd8881-29d6-b3f0-8cad-fd41e8bbedcf
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idA672:1EC9BC:5E616E:7A420D:6B00DE89
html-safe-noncee8163e7d02d17ebc8377d8a0527a9896baa00de6c1aa1c02a49b35cbd7a2c384
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNjcyOjFFQzlCQzo1RTYxNkU6N0E0MjBEOjZCMDBERTg5IiwidmlzaXRvcl9pZCI6IjQ5NzQzMDU2NzY2MTc2Mzc1MTMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac1afc96c88435f914be1fcd54025f81e1fd2eb5ef2702ae4c15ba5176ada5669a
hovercard-subject-tagpull_request:3541419616
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/getsentry/sentry-python/pull/6084/files
twitter:imagehttps://avatars.githubusercontent.com/u/5655473?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/5655473?s=400&v=4
og:image:altMigrates the httpx integration to the span-first (streaming span) architecture. When _experiments={"trace_lifecycle": "stream"} is enabled, the integration now uses StreamedSpan...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None043c3f30fbcbe2c6c8e729e10cbbbc90c406546f9fbbb67c648d38f6b7d16daf
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/getsentry/sentry-python git https://github.com/getsentry/sentry-python.git
octolytics-dimension-user_id1396951
octolytics-dimension-user_logingetsentry
octolytics-dimension-repository_id137814779
octolytics-dimension-repository_nwogetsentry/sentry-python
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id137814779
octolytics-dimension-repository_network_root_nwogetsentry/sentry-python
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release5425dc24e8bd8d6fca9641a12afc984825a43875
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/getsentry/sentry-python/pull/6084/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2Fsentry-python%2Fpull%2F6084%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2Fsentry-python%2Fpull%2F6084%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=getsentry%2Fsentry-python
Reloadhttps://github.com/getsentry/sentry-python/pull/6084/files
Reloadhttps://github.com/getsentry/sentry-python/pull/6084/files
Reloadhttps://github.com/getsentry/sentry-python/pull/6084/files
getsentryhttps://github.com/getsentry
sentry-pythonhttps://github.com/getsentry/sentry-python
Codehttps://github.com/getsentry/sentry-python
Issues345 (345)https://github.com/getsentry/sentry-python/issues
Pull requests42 (42)https://github.com/getsentry/sentry-python/pulls
Discussionshttps://github.com/getsentry/sentry-python/discussions
Actionshttps://github.com/getsentry/sentry-python/actions
Security and quality2 (2)https://github.com/getsentry/sentry-python/security
Insightshttps://github.com/getsentry/sentry-python/insights
Sign up for GitHub https://github.com/signup?return_to=%2Fgetsentry%2Fsentry-python%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fgetsentry%2Fsentry-python%2Fissues%2Fnew%2Fchoose
ericapisanihttps://github.com/ericapisani
masterhttps://github.com/getsentry/sentry-python/tree/master
ep/span-first-httpx-c35https://github.com/getsentry/sentry-python/tree/ep/span-first-httpx-c35
Conversation 56 https://github.com/getsentry/sentry-python/pull/6084
Commits 10 https://github.com/getsentry/sentry-python/pull/6084/commits
Checks 158 https://github.com/getsentry/sentry-python/pull/6084/checks
Files changed https://github.com/getsentry/sentry-python/pull/6084/files
Please reload this pagehttps://github.com/getsentry/sentry-python/pull/6084/files
feat(httpx): Migrate to span first https://github.com/getsentry/sentry-python/pull/6084/files#top
Show all changes 10 commits https://github.com/getsentry/sentry-python/pull/6084/files
b47362d feat(httpx): Migrate to span first ericapisani Apr 16, 2026 https://github.com/getsentry/sentry-python/pull/6084/commits/b47362da5166e62e755e5f6461e2657a2d10804b
019fa47 fix typing issue ericapisani Apr 16, 2026 https://github.com/getsentry/sentry-python/pull/6084/commits/019fa478c279f0c10c6fc0ac9179e752722860d6
6815bc6 Fix initialization issue raised by cursor ericapisani Apr 16, 2026 https://github.com/getsentry/sentry-python/pull/6084/commits/6815bc621e36ceba1e468df0d395dc9444921067
bf39690 Address issue raised by linter ericapisani Apr 16, 2026 https://github.com/getsentry/sentry-python/pull/6084/commits/bf39690444330a21f4504759e6e3eee5f91f6183
25a953e Address code review comments ericapisani Apr 17, 2026 https://github.com/getsentry/sentry-python/pull/6084/commits/25a953e9399d56118480620a5ab5218fe5bf1907
9d2546f Update tests. Forgot to add matching checks in other client ericapisani Apr 17, 2026 https://github.com/getsentry/sentry-python/pull/6084/commits/9d2546f142f6b77edced61ead6ad15c3659a0a2d
19eeac5 ref: Simplify end timestamp calculation in add_http_request_source ericapisani Apr 20, 2026 https://github.com/getsentry/sentry-python/pull/6084/commits/19eeac58f7867075af5047d16af958baddc0c131
a632a81 fix(httpx): Always set span attributes even when request raises ericapisani Apr 21, 2026 https://github.com/getsentry/sentry-python/pull/6084/commits/a632a818a3d2e8c26eee980d0c886ee56513ebd6
a394e2f Forgot to also update the async client ericapisani Apr 21, 2026 https://github.com/getsentry/sentry-python/pull/6084/commits/a394e2f64e17a6cff3f0ae6fdfc09ea22b2a973d
4ec4ce6 remove dead code ericapisani Apr 21, 2026 https://github.com/getsentry/sentry-python/pull/6084/commits/4ec4ce6b0024369fbcbfd3b1ee4156d31b4e36b9
Clear filters https://github.com/getsentry/sentry-python/pull/6084/files
Please reload this pagehttps://github.com/getsentry/sentry-python/pull/6084/files
Please reload this pagehttps://github.com/getsentry/sentry-python/pull/6084/files
httpx.py https://github.com/getsentry/sentry-python/pull/6084/files#diff-5c174d52941143ec8e6b0b7d639ba5960e41e14d40fd0bb5e2d78b587696a300
traces.py https://github.com/getsentry/sentry-python/pull/6084/files#diff-555ec33b3918c08498e19be9fcbe494a146cd2937357d9440dd04a8d6cbd8275
tracing_utils.py https://github.com/getsentry/sentry-python/pull/6084/files#diff-7c64294459f5053c93d44e0e33e4e73ffcef0adefcd77ba91f4031aa461a8c42
test_httpx.py https://github.com/getsentry/sentry-python/pull/6084/files#diff-1e20f4b3d07ca90a9eb99e4500d3c3185880c2da8ce3d71500841526bcedaabc
https://github.com/getsentry/sentry-python/blob/master/.github/CODEOWNERS#L1
sentry_sdk/integrations/httpx.pyhttps://github.com/getsentry/sentry-python/pull/6084/files#diff-5c174d52941143ec8e6b0b7d639ba5960e41e14d40fd0bb5e2d78b587696a300
View file https://github.com/getsentry/sentry-python/blob/4ec4ce6b0024369fbcbfd3b1ee4156d31b4e36b9/sentry_sdk/integrations/httpx.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/getsentry/sentry-python/pull/6084/{{ revealButtonHref }}
https://github.com/getsentry/sentry-python/pull/6084/files#diff-5c174d52941143ec8e6b0b7d639ba5960e41e14d40fd0bb5e2d78b587696a300
https://github.com/getsentry/sentry-python/pull/6084/files#diff-5c174d52941143ec8e6b0b7d639ba5960e41e14d40fd0bb5e2d78b587696a300
https://github.com/getsentry/sentry-python/pull/6084/files#diff-5c174d52941143ec8e6b0b7d639ba5960e41e14d40fd0bb5e2d78b587696a300
sentrivanahttps://github.com/sentrivana
Apr 17, 2026https://github.com/getsentry/sentry-python/pull/6084/files#r3098373258
Please reload this pagehttps://github.com/getsentry/sentry-python/pull/6084/files
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/getsentry/sentry-python/pull/6084/files
Please reload this pagehttps://github.com/getsentry/sentry-python/pull/6084/files
https://github.com/getsentry/sentry-python/pull/6084/files#diff-5c174d52941143ec8e6b0b7d639ba5960e41e14d40fd0bb5e2d78b587696a300
https://github.com/getsentry/sentry-python/pull/6084/files#diff-5c174d52941143ec8e6b0b7d639ba5960e41e14d40fd0bb5e2d78b587696a300
https://github.com/getsentry/sentry-python/blob/master/.github/CODEOWNERS#L1
sentry_sdk/traces.pyhttps://github.com/getsentry/sentry-python/pull/6084/files#diff-555ec33b3918c08498e19be9fcbe494a146cd2937357d9440dd04a8d6cbd8275
View file https://github.com/getsentry/sentry-python/blob/4ec4ce6b0024369fbcbfd3b1ee4156d31b4e36b9/sentry_sdk/traces.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/getsentry/sentry-python/pull/6084/{{ revealButtonHref }}
https://github.com/getsentry/sentry-python/pull/6084/files#diff-555ec33b3918c08498e19be9fcbe494a146cd2937357d9440dd04a8d6cbd8275
Please reload this pagehttps://github.com/getsentry/sentry-python/pull/6084/files
https://github.com/getsentry/sentry-python/pull/6084/files#diff-555ec33b3918c08498e19be9fcbe494a146cd2937357d9440dd04a8d6cbd8275
https://github.com/getsentry/sentry-python/pull/6084/files#diff-555ec33b3918c08498e19be9fcbe494a146cd2937357d9440dd04a8d6cbd8275
https://github.com/getsentry/sentry-python/pull/6084/files#diff-555ec33b3918c08498e19be9fcbe494a146cd2937357d9440dd04a8d6cbd8275
Please reload this pagehttps://github.com/getsentry/sentry-python/pull/6084/files
Please reload this pagehttps://github.com/getsentry/sentry-python/pull/6084/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.