From 71659ae65f9088d7339161a0d754d44e0724f855 Mon Sep 17 00:00:00 2001 From: Michael Ball Date: Tue, 4 Feb 2020 22:51:20 -0800 Subject: [PATCH] remove airbrake --- config/initializers/airbrake.rb | 22 ---------------------- 1 file changed, 22 deletions(-) delete mode 100644 config/initializers/airbrake.rb diff --git a/config/initializers/airbrake.rb b/config/initializers/airbrake.rb deleted file mode 100644 index e3c96dfc..00000000 --- a/config/initializers/airbrake.rb +++ /dev/null @@ -1,22 +0,0 @@ -Airbrake.configure do |config| - # Change this to some sensible data for your errbit instance - config.project_id = ENV['OSEM_ERRBIT_ID'] || Rails.application.secrets.errbit_id || '' - config.project_key = ENV['OSEM_ERRBIT_KEY'] || Rails.application.secrets.errbit_key || '' - config.host = ENV['OSEM_ERRBIT_HOST'] - config.environment = Rails.env - if config.project_key.blank? || config.host.blank? - config.ignore_environments = [:production, :development, :test] - else - config.ignore_environments = [:development, :test] - end -end - -Airbrake.add_filter do |notice| - notice.ignore! if notice[:errors].any? { |error| error[:type] == 'ActiveRecord::RecordNotFound' } - notice.ignore! if notice[:errors].any? { |error| error[:type] == 'ActionController::InvalidAuthenticityToken' } - notice.ignore! if notice[:errors].any? { |error| error[:type] == 'ActionController::UnknownAction' } - notice.ignore! if notice[:errors].any? { |error| error[:type] == 'AbstractController::ActionNotFound' } - notice.ignore! if notice[:errors].any? { |error| error[:type] == 'ActionView::MissingTemplate' } - notice.ignore! if notice[:errors].any? { |error| error[:type] == 'ActionController::UnknownFormat' } - notice.ignore! if notice[:errors].any? { |error| error[:type] == 'ActionController::RoutingError' && error[:message] =~ %r{\[GET\]} } -end