| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
The fix handles the case where FastAPI >= 0.137 stores the
prefix-resolved path in scope["fastapi"]["effective_route_context"] instead of scope["route"].path, so transactions/segments now show the full /api/users/{user_id} path instead of the unprefixed
/users/{user_id}.
Additionally, in the case of the `strawberry` framework without a specified path, this would fallback to using `generic FastAPI request` instead of using the prefix provided in the router (like `graphql` in the test cases.
Fixes PY-2530
Fixes #6571
Sorry, something went wrong.
|
bugbot run |
Sorry, something went wrong.
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 784e401. Configure here.
Sorry, something went wrong.
Codecov Results 📊✅ 90590 passed | ⏭️ 6031 skipped | Total: 96621 | Pass Rate: 93.76% | Execution Time: 320m 11s 📊 Comparison with Base Branch
➖ Removed Tests (4)View removed tests
All tests are passing successfully. ✅ Patch coverage is 100.00%. Project has 2421 uncovered lines.
@@ Coverage Diff @@
## main #PR +/-##
==========================================
+ Coverage 29.67% 89.75% +60.08%
==========================================
Files 192 192 —
Lines 23615 23619 +4
Branches 8130 8132 +2
==========================================
+ Hits 7007 21198 +14191
- Misses 16608 2421 -14187
- Partials 654 1340 +686Generated by Codecov Action |
Sorry, something went wrong.
…etsentry#6572) FastAPI >= 0.137 stores the prefix-resolved path in `scope["fastapi"]["effective_route_context"]` instead of `scope["route"].path`, so transactions/segments were showing the unprefixed `/users/{user_id}` instead of the full `/api/users/{user_id}` for routers mounted with a prefix. This fix prefers `effective_route_context.path` when available, falling back to `route.path` for older FastAPI versions. Fixes PY-2530 Fixes getsentry#6571
| Back | FazBrowse Home | New Git URL |
FastAPI >= 0.137 stores the prefix-resolved path in scope["fastapi"]["effective_route_context"] instead of scope["route"].path, so transactions/segments were showing the unprefixed /users/{user_id} instead of the full /api/users/{user_id} for routers mounted with a prefix.
This fix prefers effective_route_context.path when available, falling back to route.path for older FastAPI versions.
Fixes PY-2530
Fixes #6571