Skip to content

Commit

Permalink
Merge pull request #1096 from alphagov/upgrade-to-sentry-ruby
Browse files Browse the repository at this point in the history
Prepare for govuk_app_config v4 (Sentry fingerprinting)
  • Loading branch information
ChrisBAshton authored Jul 13, 2021
2 parents a4aa118 + 426a141 commit 3b87212
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
- BREAKING: Remove `set_email_subscription` method and helpers (for Account API)
- BREAKING: Rename `stub_account_api_get_email_subscription_unauthorized` to `stub_account_api_unauthorized_get_email_subscription` for consistency (for Account API)
- BREAKING: Rename `stub_account_api_delete_saved_page_unauthorised` to `stub_account_api_unauthorized_delete_saved_page` for consistency (for Account API)
- BREAKING: Change how we apply Sentry's fingerprinting algorithm ([#1096](https://github.com/alphagov/gds-api-adapters/pull/1096)).
Updating gds-api-adapters but failing to update govuk_app_config to v4 may mean application errors are not as effectively 'grouped' in Sentry.

# 71.9.0

Expand Down
2 changes: 1 addition & 1 deletion lib/gds_api/exceptions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module GdsApi
class BaseError < StandardError
# Give Sentry extra context about this event
# https://docs.sentry.io/clients/ruby/context/
def raven_context
def sentry_context
{
# Make Sentry group exceptions by type instead of message, so all
# exceptions like `GdsApi::TimedOutException` will get grouped as one
Expand Down
2 changes: 1 addition & 1 deletion test/exceptions_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ class GdsApiBaseTest < Minitest::Test
def test_fingerprints_per_exception_type
exception = GdsApi::HTTPBadGateway.new(200)

assert_equal ["GdsApi::HTTPBadGateway"], exception.raven_context[:fingerprint]
assert_equal ["GdsApi::HTTPBadGateway"], exception.sentry_context[:fingerprint]
end
end

0 comments on commit 3b87212

Please sign in to comment.