Skip to content

Rename Sentry::Client to ErrorTracking::SentryClient

Sean McGivern requested to merge rename-sentry-module into master

We're going to upgrade the Sentry gem in a future MR. The new version exports a Sentry class, rather than the current Raven class. This would clash with our existing Sentry namespace, used for the Sentry::Client class, which is part of our feature where user projects can integrate with Sentry.

To start to untangle this, we move Sentry::Client to ErrorTracking::SentryClient. This has a number of benefits:

  1. We're following our namespacing guidelines by putting this code under the ErrorTracking namespace, which is the relevant application domain.
  2. We don't end up with any Sentry namespace at all, so there is no ambiguity when we add the top-level Sentry definition with the gem upgrade.
  3. The indentation for most classes and modules in this commit doesn't change, leading to a cleaner diff :-)

There are also some classes related to the error tracking feature that are in the Gitlab::ErrorTracking namespace, rather than just ErrorTracking. Those are tracked in the below issue:

#323342 (closed)

Part of gitlab-com/gl-infra/scalability#849.

Screenshots

Sentry error Error issue
Screenshot_from_2021-03-04_13-00-09 Screenshot_from_2021-03-04_12-59-31
Edited by Peter Leitzen

Merge request reports

Loading