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.
In the major release which renamed sentry-raven to sentry-ruby,
the rails config was extracted into its own sentry-rails gem:
https://docs.sentry.io/platforms/ruby/guides/rails/
I had hoped to have downstream apps explicitly
require "sentry-rails"
only if they need it, however this meansthe code is evaluated too late in the process, as GovukError is
already defined at that point. For example, trying to set
config.rails.report_rescued_exceptions
in email-alert-api ongovuk_app_config v4.0.0.pre.2 leads to this error:
It seems the only alternative is to include
sentry-rails
inGovukAppConfig by default. Most of our apps are Rails apps anyway,
so in practice this should DRY up a bit of configuration across
our apps, as well as making it easier to keep sentry-rails in sync
with sentry-ruby. The only downside is in Rack apps which don't
have Rails, which now have an unnecessary extra dependency - not
a terrible downside in the grand scheme of things.
Depended on by alphagov/email-alert-api#1629.
Trello: https://trello.com/c/4JOuje6O/2546-fix-broken-data-sync-related-sentry-errors-not-being-ignored