LoginSignup
1

More than 5 years have passed since last update.

Bugsnag 5.4でinfoレベルのRailsのエラーも通知されてしまう場合の対処方法

Last updated at Posted at 2017-10-15

Bugsnag5.4.0からそれまでデフォルトで除外されていたエラーもinfoレベルで通知されるようになっているので、以下のどちらかの方法でメール通知から除外しておくほうが運用上良さそう。

ignore_classes設定に追加する

config/initializers/bugsnag.rb
Bugsnag.configure do |config|
  config.api_key = "xxxxx"
  config.notify_release_stages = %w[production staging]

  config.ignore_classes.merge([
    AbstractController::ActionNotFound,
    ActionController::InvalidAuthenticityToken,
    ActionController::ParameterMissing,
    ActionController::RoutingError,
    ActionController::UnknownFormat,
    ActionController::UnknownHttpMethod,
    ActiveRecord::RecordNotFound,
    SignalException,
  ])
end

Bugsnag側の設定でinfoレベルはメール通知されないように設定する

  1. Bugsnagのプロジェクトページを開く
  2. Settings -> Email notifications -> Filter by severity
  3. infoからチェックを外す

参考リンク

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1