Table of contents

Upgrade to Sentry

We are migrating all apps to use Sentry.

1. Make the application changes

To upgrade make a PR that does the following:

  1. Remove the airbrake gem from the app
  2. Remove the Airbrake initialiser rm config/initializers/airbrake.rb
  3. Add gem "govuk_app_config", "~> 0.2.0" to your Gemfile
  4. If you use govuk_sidekiq, upgrade at least gem "govuk_sidekiq", "~> 2.0.0", as earlier versions require Airbrake
  5. If you use slimmer, upgrade to at least gem "slimmer", "~> 11.0.2", otherwise errors won’t be reported
  6. (Optional) If you use gds-api-adapters, upgrade to at least gem "gds-api-adapters", "~> 47.9.1" to improve error reporting
  7. Change any manual calls to Airbrake with new-style error logs:
  GovukError.notify("My message here")

More about this in govuk_app_config’s README.

2. Test that error reporting works

The deploy script will attempt to run the old Airbrake notification rake task. This task doesn’t exist anymore, so it will send an error to Sentry. If you can see it on Sentry, then you’ve successfully upgraded. Well done! ✊

You can also trigger a test exception manually by running the sentry: rake task.

Don’t forget to mark your Trello ticket as done.

This page is owned by @tijmen and needs to be reviewed