From 751e9ce596fb1382579cd0fa2f120044040866c3 Mon Sep 17 00:00:00 2001 From: Molly Struve Date: Sun, 9 Aug 2020 13:25:30 -0500 Subject: [PATCH] [deploy] Optimization:Set Honeybadger send_data_at_exit to False (#9687) --- config/initializers/honeybadger.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/config/initializers/honeybadger.rb b/config/initializers/honeybadger.rb index 4e6297ec7..5893b01a5 100644 --- a/config/initializers/honeybadger.rb +++ b/config/initializers/honeybadger.rb @@ -12,10 +12,18 @@ COMPONENT_FINGERPRINTS = { "internal" => "internal" }.freeze +# https://docs.honeybadger.io/lib/ruby/gem-reference/configuration.html Honeybadger.configure do |config| config.env = "#{ApplicationConfig['APP_DOMAIN']}-#{Rails.env}" config.api_key = ApplicationConfig["HONEYBADGER_API_KEY"] config.revision = ApplicationConfig["HEROKU_SLUG_COMMIT"] + + # Prevent Ruby from exiting until all queued notices have been delivered to Honeybadger. + # When set to true(default), it can lead to a large number of errors causing a process to get stuck. + # To prevent this we set it to false ensuring that a process can exit quickly regardless of errors. + # Logging allows us to fill in gaps if we need to when errors get discarded. + config.send_data_at_exit = false + config.exceptions.ignore += [ Pundit::NotAuthorizedError, ActiveRecord::RecordNotFound,