Last active
January 14, 2016 02:02
-
-
Save rob-mcgrail/1fd939a057f23a16a7e0 to your computer and use it in GitHub Desktop.
Airbrake config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://github.com/airbrake/airbrake-ruby#configuration | |
Airbrake.configure do |c| | |
# You must set both project_id & project_key. To find your project_id and | |
# project_key navigate to your project's General Settings and copy the values | |
# from the right sidebar. | |
# https://github.com/airbrake/airbrake-ruby#project_id--project_key | |
c.project_id = 'xxxx' | |
c.project_key = 'xxxxxxxxxxx' | |
c.root_directory = Rails.root | |
c.logger = Rails.logger | |
c.environment = Rails.env | |
c.ignore_environments = %w(test development) | |
end | |
Airbrake.add_filter do |notice| | |
if notice[:errors].any? { |error| error[:type] == 'CanCan::AccessDenied' } | |
notice.ignore! | |
end | |
end | |
Airbrake.add_filter do |notice| | |
if notice[:errors].any? { |error| error[:type] == 'ActionController::RoutingError' } | |
notice.ignore! | |
end | |
end | |
Airbrake.add_filter do |notice| | |
if notice[:params]['retry_count'].present? | |
unless notice[:params]['retry_count'] == 0 | |
notice.ignore! | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment