[deploy] Optimization:Set Honeybadger send_data_at_exit to False (#9687)

This commit is contained in:
Molly Struve 2020-08-09 13:25:30 -05:00 committed by GitHub
parent 690fef4b4f
commit 751e9ce596
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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,