Extra Options for My Airbrake.rb

A Basic airbrake.rb file should look at least like the following:

Airbrake.configure do |config|
  config.api_key = '********************************'
end

Extra options are configured by adding extra lines to the above block

Collect Errors from your Development Environment

config.development_environments = []

Ignoring Errors certain types of errors

Airbrake ignores the following exceptions by default

AbstractController::ActionNotFound
ActiveRecord::RecordNotFound
ActionController::RoutingError
ActionController::InvalidAuthenticityToken
ActionController::UnknownAction
CGI::Session::CookieStore::TamperedWithCookie


Ignore an error In addition to The defaults
  config.ignore << "ActiveRecord::IgnoreThisError"


Ignore only certain errors (and override the defaults)
  config.ignore_only  = ["ActiveRecord::IgnoreThisError"]


Send Every Error (and override the defaults)
config.ignore_only  = []


Ignore certain user agents as a string
config.ignore_user_agent << 'IgnoredUserAgent'


Ignore certain user agents as regex
config.ignore_user_agent  << /IgnoredUserAgent/


Ignore exceptions based on conditions
config.ignore_by_filter do |exception_data|
  true if exception_data[:error_class] == "RuntimeError"
end


To replace sensitive information sent to the Airbrake service with [FILTERED]
config.params_filters << "credit_card_number"

Note that, when rescuing exceptions within an ActionController method airbrake will reuse filters specified by #filter_parameter_logging.