From c107f36f6dc29e47fd7e7918b0892446bbe48e5d Mon Sep 17 00:00:00 2001 From: Michael Ball Date: Sat, 20 Feb 2021 09:50:48 -0800 Subject: [PATCH] Finish upgrading the sentry plugin --- Gemfile | 1 + Gemfile.lock | 3 +++ config/initializers/sentry.rb | 4 ++-- config/puma.rb | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index 62058e38..afae26db 100644 --- a/Gemfile +++ b/Gemfile @@ -143,6 +143,7 @@ gem 'axlsx_rails' gem 'sentry-ruby' gem 'sentry-rails' +gem 'sentry-delayed_job' # to make links faster gem 'turbolinks' diff --git a/Gemfile.lock b/Gemfile.lock index 7f92f28e..9fce2848 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -525,6 +525,8 @@ GEM selenium-webdriver (3.142.6) childprocess (>= 0.5, < 4.0) rubyzip (>= 1.2.2) + sentry-delayed_job (4.2.1) + sentry-ruby-core (~> 4.2.0) sentry-rails (4.2.2) rails (>= 5.0) sentry-ruby-core (~> 4.2.0) @@ -712,6 +714,7 @@ DEPENDENCIES ruby-oembed sass-rails (>= 4.0.2) selectize-rails + sentry-delayed_job sentry-rails sentry-ruby shoulda-matchers diff --git a/config/initializers/sentry.rb b/config/initializers/sentry.rb index b504df81..1daf0745 100644 --- a/config/initializers/sentry.rb +++ b/config/initializers/sentry.rb @@ -1,4 +1,4 @@ -Raven.configure do |config| +Sentry.init do |config| + config.allowed_environments = %|production staging| config.dsn = ENV['SENTRY_DSN'] - config.sanitize_fields = Rails.application.config.filter_parameters.map(&:to_s) end diff --git a/config/puma.rb b/config/puma.rb index 1d43c487..ed6fe45b 100644 --- a/config/puma.rb +++ b/config/puma.rb @@ -44,7 +44,7 @@ on_worker_boot do end lowlevel_error_handler do |ex, env| - Raven.capture_exception( + Sentry.capture_exception( ex, :message => ex.message, :extra => { :puma => env },