Skip to content

fix(starlette): Use url transaction source for host routing - #7266

Merged
sentrivana merged 1 commit into
masterfrom
mjq/fix-starlette-host-route-source
Aug 27, 2026
Merged

fix(starlette): Use url transaction source for host routing#7266
sentrivana merged 1 commit into
masterfrom
mjq/fix-starlette-host-route-source

Conversation

@mjq

@mjq mjq commented Aug 26, 2026

Copy link
Copy Markdown
Member

Description

When host routing, we don't have a route and instead fall back to the request path for the transaction name. This should be given transaction source url (for raw URLs) instead of the current value of route (for parameterized routes).

This matters for #7183, where the mis-categorized transaction source would lead to bad data in http.route. (Bug found by Cursor in #7183 (comment) when reviewing that PR).

@cursor cursor Bot 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.

✅ 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 563ea47. Configure here.

@github-actions

github-actions Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Codecov Results 📊

118306 passed | ⏭️ 6732 skipped | Total: 125038 | Pass Rate: 94.62% | Execution Time: 414m 56s

📊 Comparison with Base Branch

Metric Change
Total Tests 📈 +11
Passed Tests 📈 +12
Failed Tests 📉 -1
Skipped Tests

➖ Removed Tests (1)

View removed tests
  • test_continuous_profiler_auto_start_and_stop_sampled[non-experiment-gevent]
    • File: tests.profiler.test_continuous_profiler

All tests are passing successfully.

✅ Patch coverage is 85.71%. Project has 2486 uncovered lines.
✅ Project coverage is 90.24%. Comparing base (base) to head (head).

Files with missing lines (1)
File Patch % Lines
sentry_sdk/integrations/starlette.py 85.71% ⚠️ 1 Missing
Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
+ Coverage    90.24%    90.24%        —%
==========================================
  Files          193       193         —
  Lines        25474     25473        -1
  Branches      9378      9378         —
==========================================
+ Hits         22988     22987        -1
- Misses        2486      2486         —
- Partials      1431      1431         —

Generated by Codecov Action

@mjq
mjq marked this pull request as ready for review August 27, 2026 13:47
@mjq
mjq requested a review from a team as a code owner August 27, 2026 13:47

@sentrivana sentrivana 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.

Ty!

@sentrivana
sentrivana merged commit 8fae8a6 into master Aug 27, 2026
269 of 272 checks passed
@sentrivana
sentrivana deleted the mjq/fix-starlette-host-route-source branch August 27, 2026 14:15
Sign up for free to 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.

2 participants