Skip to content

Upgrade Sentry gem to version 4.4.0

What does this MR do?

This MR is to upgrade Sentry gem to version 4.4.0, as a apart of gitlab-com/gl-infra/scalability#849 (closed). Sentry introduced many major breaking changes since our current version (3.1.x). This MR consists of:

  • Replace sentry-raven (3.1.x) by sentry-ruby (4.4.0), sentry-sidekiq (4.4.0), sentry-rails (4.4.0)
  • Rename all occurrences of Raven to Sentry.
  • Fix interface changes, for example, Raven.context has been changed to Sentry.get_current_scope.context.
  • Sentry 4.4.0 sends the events in a background thread pool. This change needs some times for us to test on staging and production before fully rolling out. Hence, this feature is disable, all events are sent synchronously.
  • Implement sanitizer processor as Sentry removes sanitize_fields and sanitize_http_headers configurations.

The full list of breaking changes can be found at https://docs.sentry.io/platforms/ruby/migration/

Screenshots (strongly suggested)

Exception captured in web. Feature category is not available (mentioned in gitlab-com/gl-infra&396 (closed))

Screen_Shot_2021-06-01_at_10.46.04

Screen_Shot_2021-06-01_at_10.46.22

Exception captured in API. Feature category is captured, Authorization header is filtered

Screen_Shot_2021-06-01_at_10.48.15

Screen_Shot_2021-06-01_at_10.48.26

Exception captured in GraphQL. Feature category is always not_owned, Authorization header is filtered

Screen_Shot_2021-06-01_at_10.49.46

Screen_Shot_2021-06-01_at_10.49.56

Exception captured in Sidekiq. Feature category is not captured, sensitive fields in the job payload is filtered Screen_Shot_2021-06-01_at_10.51.05

Screen_Shot_2021-06-01_at_10.51.24

Manually captured an exception in Web.

Screen_Shot_2021-06-01_at_10.53.10

Manually capture an exception in API. Screen_Shot_2021-06-01_at_10.53.56
Manually capture an exception in GraphQL. Screen_Shot_2021-06-01_at_10.54.34
Manually capture an exception in Sidekiq. Screen_Shot_2021-06-01_at_10.55.15
Manually capture with sensitive information
Gitlab::ErrorTracking.track_exception(StandardError.new('Event with sensitive information'), {deep: {inside: {a_hash: {password: '1234'}}}})

Screen_Shot_2021-06-01_at_10.58.12

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

Does this MR contain changes to processing or storing of credentials or tokens, authorization and authentication methods or other items described in the security review guidelines? If not, then delete this Security section.

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Katrin Leinweber

Merge request reports

Loading