diff --git a/Gemfile b/Gemfile index ac583dd..0497515 100644 --- a/Gemfile +++ b/Gemfile @@ -76,6 +76,11 @@ gem 'strscan' # New Relic Ruby Agent gem 'newrelic_rpm' +# The Sentry SDK for Rails +gem "stackprof" +gem "sentry-ruby" +gem "sentry-rails" + group :doc do gem 'apipie-rails' gem 'sdoc' diff --git a/Gemfile.lock b/Gemfile.lock index 5c8975a..5b98794 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -377,6 +377,12 @@ GEM sdoc (2.6.1) rdoc (>= 5.0) securerandom (0.4.1) + sentry-rails (5.22.4) + railties (>= 5.0) + sentry-ruby (~> 5.22.4) + sentry-ruby (5.22.4) + bigdecimal + concurrent-ruby (~> 1.0, >= 1.0.2) shoulda-matchers (6.4.0) activesupport (>= 5.2.0) sidekiq (7.3.8) @@ -420,6 +426,7 @@ GEM activesupport (>= 6.1) sprockets (>= 3.0.0) squasher (0.8.0) + stackprof (0.2.27) stringio (3.1.2) strscan (3.1.2) thor (1.3.2) @@ -491,6 +498,8 @@ DEPENDENCIES rubocop rufus-scheduler sdoc + sentry-rails + sentry-ruby shoulda-matchers sidekiq simplecov @@ -499,6 +508,7 @@ DEPENDENCIES spring-commands-rspec sprockets-rails squasher (>= 0.6.0) + stackprof strscan will_paginate (~> 3.3) diff --git a/config/initializers/sentry.rb b/config/initializers/sentry.rb new file mode 100644 index 0000000..bfa3461 --- /dev/null +++ b/config/initializers/sentry.rb @@ -0,0 +1,7 @@ +# frozen_string_literal: true + +Sentry.init do |config| + config.breadcrumbs_logger = [:active_support_logger] + config.dsn = ENV['SENTRY_DSN'] + config.enable_tracing = true +end