Enable Rails 7 error reporter via Rollbar config #1161
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of the change
Optionally enables the Rails 7 error reporter. https://edgeguides.rubyonrails.org/error_reporting.html
The new Boolean config key is
enable_rails_error_subscriber
.This is off by default for back compatibility, and can be enabled in the Rollbar initializer, or enabled/disabled at any time via the
Rollbar.configure
method.This is available with Rails 7.1+ because that's when
unsubscribe
was introduced.This PR also fixes an issue with the
Rollbar::Logger
class.initialize
should callsuper
. This issue breaks in recent Logger versions.Normally I'd put this in a separate PR, but since it breaks CI I've added it here.
Note: This PR also enables both hash syntaxes in rubocop.
Type of change
Related issues
Fixes:
#1105
#1153
#1156
Development
Code review