Read more

exception_notification 4.0.0+ makes it easier to ignore errors, crawlers

Henning Koch
July 30, 2013Software engineer at makandra GmbH

The new exception_notification Show archive.org snapshot has awesome options like :ignore_crawlers => true and :ignore_if => lambda { ... }. These options should be helpful in ensuring every notifications means something actionable (instead of a long log of failures that just scrolls by).

Illustration web development

Do you need DevOps-experts?

Your development team has a full backlog? No time for infrastructure architecture? Our DevOps team is ready to support you!

  • We build reliable cloud solutions with Infrastructure as code
  • We are experts in security, Linux and databases
  • We support your dev team to perform
Read more Show archive.org snapshot

Note that you should not ignore crawlers by default. Ideally, cool URLs never change and always respond with a helpful redirect or similar.

Ignore Errors like this:

# config/initializers/exception_notification.rb

ExceptionNotification.configure do |config|
  # ...
  config.ignored_exceptions += %w[OneException AnotherError]
end

In older versions of exception_notifications, you would use config.ignored_errors instead.

Compatibility & config changes

Unfortunately it's Ruby 1.9.3 only and you need to make a small config change in application.rb:

config.middleware.use ExceptionNotification::Rack, # not the new middleware class
  :email => { .... old options here ... }

After deploying the change, make sure notifications are still sent (internal card).

Posted by Henning Koch to makandra dev (2013-07-30 10:16)