Read more

ExceptionNotification gem will only show application backtrace starting on Rails 4

Tobias Kraze
September 29, 2015Software engineer at makandra GmbH

Starting with Rails 4.0, when you get an exception reported via the ExceptionNotification gem, you will only see a very short backtrace with all backtrace lines from gems or ruby libraries missing.

Illustration online protection

Rails Long Term Support

Rails LTS provides security patches for old versions of Ruby on Rails (2.3, 3.2, 4.2 and 5.2)

  • Prevents you from data breaches and liability risks
  • Upgrade at your own pace
  • Works with modern Rubies
Read more Show archive.org snapshot

This happens, because the ExceptionNotification gem uses Rails' default backtrace cleaner. To get a full backtrace in exception emails, you can remove the comment from this line in config/initializers/backtrace_silencers.rb:

Rails.backtrace_cleaner.remove_silencers!

Note that this will break the "Application Trace" functionality on default Rails error pages, i.e. you will always see the full trace an no longer be able to filter out any lines from gems.

Better errors Show archive.org snapshot is not affected.

Posted by Tobias Kraze to makandra dev (2015-09-29 16:37)