Skip to content

Instantly share code, notes, and snippets.

@jonleighton
Created October 23, 2013 16:48
Show Gist options
  • Save jonleighton/7122210 to your computer and use it in GitHub Desktop.
Save jonleighton/7122210 to your computer and use it in GitHub Desktop.
Report Rails deprecation warnings to Honeybadger (useful in production if there might be lines of code not covered by your tests - the horror!). Place this in your config/environments/production.rb
ActiveSupport::Notifications.subscribe('deprecation.rails') do |name, start, finish, id, payload|
Honeybadger.notify(
error_class: "DEPRECATION WARNING",
error_message: payload[:message],
backtrace: payload[:callstack]
)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment