diff --git a/Gemfile.lock b/Gemfile.lock index e5caa4dfc..badb5a81b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -106,9 +106,10 @@ GEM tzinfo (~> 1.1) addressable (2.6.0) public_suffix (>= 2.0.2, < 4.0) - airbrake (6.0.0) - airbrake-ruby (~> 2.0) - airbrake-ruby (2.0.0) + airbrake (9.4.3) + airbrake-ruby (~> 4.6) + airbrake-ruby (4.6.0) + rbtree3 (~> 0.5) akami (1.3.1) gyoku (>= 0.4.0) nokogiri @@ -336,6 +337,7 @@ GEM activesupport (>= 3.0) i18n polyamorous (~> 1.1) + rbtree3 (0.5.0) rdoc (4.3.0) regexp_parser (1.5.1) request_store (1.4.1) diff --git a/config/initializers/airbrake.rb b/config/initializers/airbrake.rb new file mode 100644 index 000000000..917deb02a --- /dev/null +++ b/config/initializers/airbrake.rb @@ -0,0 +1,18 @@ +Airbrake.configure do |config| + config.host = ENV['airbrake_host'] + config.project_id = ENV['airbrake_project_id'] + config.project_key = ENV['airbrake_project_key'] + config.root_directory = Rails.root + config.logger = + if ENV['RAILS_LOG_TO_STDOUT'].present? + Logger.new(STDOUT, level: Rails.logger.level) + else + Logger.new( + Rails.root.join('log', 'airbrake.log'), + level: Rails.logger.level + ) + end + config.environment = ENV['airbrake_env'] || Rails.env + config.ignore_environments = %w[test] + config.blacklist_keys = Rails.application.config.filter_parameters +end diff --git a/config/initializers/errbit.rb b/config/initializers/errbit.rb deleted file mode 100644 index 3d4185834..000000000 --- a/config/initializers/errbit.rb +++ /dev/null @@ -1,22 +0,0 @@ -module Patches - module Airbrake - module SyncSender - def build_https(uri) - super.tap do |req| - req.verify_mode = OpenSSL::SSL::VERIFY_NONE - end - end - end - end -end - -Airbrake::SyncSender.prepend(::Patches::Airbrake::SyncSender) - -Airbrake.configure do |config| - config.host = ENV['airbrake_host'] - config.project_id = ENV['airbrake_project_id'] - config.project_key = ENV['airbrake_project_key'] - - config.environment = ENV['airbrake_env'] || Rails.env - config.ignore_environments = %w(development test) -end