Skip to content

Commit

Permalink
Explicit configure of Sentry as error subscriber (#343)
Browse files Browse the repository at this point in the history
  • Loading branch information
timpeat authored Jul 7, 2023
1 parent 55f0fa5 commit 26a3184
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions config/initializers/sentry.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
config.rails.report_rescued_exceptions = true
config.breadcrumbs_logger = [:active_support_logger, :http_logger]
config.environment = HostEnv.env_name

# Contrary to what is stated in https://edgeguides.rubyonrails.org/error_reporting.html,
# Sentry currently requires explicit configuration in order to register as a subscriber.
# See discussion on GitHub at https://github.com/rails/rails/pull/43625#issuecomment-1072514175.
config.rails.register_error_subscriber = true

# Filtering
# https://docs.sentry.io/platforms/ruby/guides/rails/configuration/filtering/
Expand Down

0 comments on commit 26a3184

Please sign in to comment.