From dc6e06bfbba17767e3a48b9466805d4fee6e1a2f Mon Sep 17 00:00:00 2001 From: vitalie Date: Thu, 24 Aug 2023 11:58:25 +0300 Subject: [PATCH] Replace gem sentry-raven with sentry-ruby --- Gemfile | 2 +- Gemfile.lock | 9 +++------ config.ru | 2 +- lib/travis/listener.rb | 5 +++-- lib/travis/listener/app.rb | 2 +- 5 files changed, 9 insertions(+), 11 deletions(-) diff --git a/Gemfile b/Gemfile index 00dadc1..e82d286 100644 --- a/Gemfile +++ b/Gemfile @@ -15,7 +15,7 @@ gem 'puma' gem 'sinatra', '~> 2.0.3' gem 'rake', '~> 12.3.3' -gem 'sentry-raven' +gem 'sentry-ruby' gem 'activesupport', '~> 4.1.11' diff --git a/Gemfile.lock b/Gemfile.lock index ddc8512..43c303e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -31,8 +31,6 @@ GEM connection_pool (2.2.1) diff-lcs (1.5.0) docile (1.4.0) - faraday (0.15.0) - multipart-post (>= 1.2, < 3) foreman (0.41.0) thor (>= 0.13.6) hashr (2.0.1) @@ -48,7 +46,6 @@ GEM metriks-librato_metrics (1.0.6) metriks (>= 0.9.9.6) minitest (5.11.3) - multipart-post (2.0.0) mustermann (1.0.3) nio4r (2.5.8) parallel (1.23.0) @@ -105,8 +102,8 @@ GEM rubocop-rspec (2.10.0) rubocop (~> 1.19) ruby-progressbar (1.13.0) - sentry-raven (2.7.3) - faraday (>= 0.7.6, < 1.0) + sentry-ruby (5.10.0) + concurrent-ruby (~> 1.0, >= 1.0.2) sidekiq (4.0.2) concurrent-ruby (~> 1.0) connection_pool (~> 2.2, >= 2.2.0) @@ -158,7 +155,7 @@ DEPENDENCIES rubocop-performance rubocop-rake rubocop-rspec - sentry-raven + sentry-ruby sidekiq (~> 4.0.0) simplecov simplecov-console diff --git a/config.ru b/config.ru index 0eae917..70c09a6 100644 --- a/config.ru +++ b/config.ru @@ -6,5 +6,5 @@ require 'travis/listener' Travis::Listener.setup -use Raven::Rack if Travis.config.sentry.dsn +use Sentry::Rack::CaptureExceptions if Travis.config.sentry.dsn run Travis::Listener::App diff --git a/lib/travis/listener.rb b/lib/travis/listener.rb index 713879b..538dfbe 100644 --- a/lib/travis/listener.rb +++ b/lib/travis/listener.rb @@ -29,8 +29,9 @@ class Config < Travis::Config class << self def setup if Travis.config.sentry.dsn - require 'raven' - ::Raven.configure do |config| + require 'sentry-ruby' + + ::Sentry.init do |config| config.dsn = Travis.config.sentry.dsn config.excluded_exceptions = %w[Sinatra::NotFound] end diff --git a/lib/travis/listener/app.rb b/lib/travis/listener/app.rb index 2eace99..9cba271 100644 --- a/lib/travis/listener/app.rb +++ b/lib/travis/listener/app.rb @@ -213,7 +213,7 @@ def event_details rescue StandardError => e error("Error logging payload: #{e.message}") error("Payload causing error: #{decoded_payload}") - Raven.capture_exception(e) + Sentry.capture_exception(e) {} end