Repository navigation
fix(bottle): Set transaction name in event processor - #7551
Conversation
Codecov Results 📊✅ 66085 passed | ⏭️ 2999 skipped | Total: 69084 | Pass Rate: 95.66% | Execution Time: 191m 20s All tests are passing successfully. ✅ Patch coverage is 100.00%. Project has 2074 uncovered lines. Files with missing lines (1)
Coverage diff@@ Coverage Diff @@
## master #PR +/-##
==========================================
- Coverage 90.20% 90.10% -0.1%
==========================================
Files 193 179 -14
Lines 25773 20947 -4826
Branches 9532 7530 -2002
==========================================
+ Hits 23248 18873 -4375
- Misses 2525 2074 -451
- Partials 1431 1181 -250Generated by Codecov Action |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit ebb39c1. Configure here.
| or "bottle request" | ||
| ) | ||
| except RuntimeError: | ||
| return "bottle request" |
There was a problem hiding this comment.
Missing route breaks event processor
Medium Severity
_get_transaction_name only catches RuntimeError, so a bound request with no route yet raises AttributeError on .rule or .name. That failure is new in the event processor and aborts it, so events from before_request hooks or unmatched routes lose request data and never receive a fallback transaction name.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit ebb39c1. Configure here.


Bottle seems to be the only web framework integration that sets the transaction name late, so errors that happen before that might not get associated to the correct segment name. We can't move the logic because we don't have enough information before that point. Restore the transaction setting logic in the event processor.
Closes https://linear.app/getsentry/issue/PY-2784/double-check-that-set-transaction-name-is-set-early-enough