-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Check Rails.backtrace_cleaner method exists (#734)
Check if the Rails.backtrace_cleaner method exists before calling it. We've got a report from a user that the method call fails with a NoMethodError in a Sinatra app using the activesupport and actionmailer gems version 5.2.0. ``` NoMethodError - undefined method `backtrace_cleaner' for Rails:Module: /gems/appsignal-3.0.6/lib/appsignal/transaction.rb:530:in `cleaned_backtrace' ``` I was unable to reproduce in the test setups, but I can see a scenario where this could fail. To make sure we don't cause this kind of error in such a scenario, check if the Rails module listens to the `backtrace_cleaner` method before calling it. appsignal/test-setups@d484b36
- Loading branch information
Showing
3 changed files
with
13 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
bump: "patch" | ||
--- | ||
|
||
Check Rails.backtrace_cleaner method before calling the method. This prevents a NoMethodError from being raised in some edge cases. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters