Skip to content

Make rescue_from_handled.action_controller store the full backtrace#56426

Merged
skipkayhil merged 1 commit intorails:mainfrom
zzak:re-56060
Feb 1, 2026
Merged

Make rescue_from_handled.action_controller store the full backtrace#56426
skipkayhil merged 1 commit intorails:mainfrom
zzak:re-56060

Conversation

@zzak
Copy link
Member

@zzak zzak commented Dec 22, 2025

When config.action_controller.rescue_from_event_backtrace is :array, the payload for this notification will include the full backtrace.

This also affects action_controller.rescue_from_handled events.

Fixes: #56060

/cc @skipkayhil This is kind of what I had in mind, then we can decide to deprecate and remove that flag (along with the behavior). There is no direct connection to the flag and the payload -- but the combination of changelog, flag, a release, and a deprecation be loud enough to correct any issues that may arise, then again -- it's a brand new event in 8.1, so that might be overkill. Happy to step this back and just change it, but it'd suck to maybe break peoples o11y who might have already started listening for this event.

I did add a test for the delete_prefix(Rails.root) part, which is also a nice addition I can pull out from this if we need to think about it more.

When `config.action_controller.rescue_from_event_backtrace` is `:array`,
the payload for this notification will include the full backtrace.

This also affects `action_controller.rescue_from_handled` events.
@skipkayhil skipkayhil merged commit 99f37d0 into rails:main Feb 1, 2026
4 checks passed
@skipkayhil skipkayhil deleted the re-56060 branch February 1, 2026 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Inconsistent value for exception_backtrace in events

2 participants