Upgrade to newest Sentry

This commit is contained in:
Sebastian Serth
2021-03-04 14:02:16 +01:00
parent 22adcaddba
commit b10e23dd16
20 changed files with 72 additions and 67 deletions

View File

@ -1,21 +0,0 @@
# frozen_string_literal: true
require 'concurrent'
Rails.application.tap do |app|
pool = ::Concurrent::ThreadPoolExecutor.new(max_queue: 10)
Raven.configure do |config|
config.sanitize_fields = app.config.filter_parameters.map(&:to_s)
config.processors -= [Raven::Processor::PostData] # Do this to send POST data
# config.excluded_exceptions -= ['ActionController::InvalidAuthenticityToken']
config.async = lambda do |event|
pool.post { ::Raven.send_event(event) }
end
# Do not sent full list of gems with each event
config.send_modules = false
end
end

View File

@ -0,0 +1,16 @@
# frozen_string_literal: true
Sentry.init do |config|
# Do not send full list of gems with each event
config.send_modules = false
# Send some more data, such as request bodies
config.send_default_pii = true
# Strip sensitive user data such as passwords from event annotations
filter = ActionDispatch::Http::ParameterFilter.new(Rails.application.config.filter_parameters)
config.before_send = lambda do |event, _hint|
event.request.data = filter.filter(event.request.data)
event
end
end