Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: remove redundant Sentry-disabling code #2139

Merged
merged 1 commit into from
Aug 16, 2024

Conversation

digitalcora
Copy link
Contributor

Simplifies the multiple overlapping mechanisms for enabling and disabling Sentry, hopefully without changing existing behavior.

  • If a SENTRY_DSN environment variable is defined, and the Mix env is prod, Sentry is enabled on the backend.
  • If the above is true and there is not a disable_sentry query param in the URL, Sentry is also enabled on the frontend.

There do not appear to be any screens actively using disable_sentry at the time of writing, but we'll leave this feature alone for now.

Simplifies the multiple overlapping mechanisms for enabling and
disabling Sentry, hopefully without changing existing behavior.

* If a `SENTRY_DSN` environment variable is defined, and the Mix env is
  `prod`, Sentry is enabled on the backend.

* If the above is true _and_ there is not a `disable_sentry` query param
  in the URL, Sentry is also enabled on the frontend.

There do not appear to be any screens actively using `disable_sentry` at
the time of writing, but we'll leave this feature alone for now.
@digitalcora digitalcora marked this pull request as ready for review August 15, 2024 21:56
@digitalcora digitalcora requested a review from a team as a code owner August 15, 2024 21:56
Copy link
Contributor

@cmaddox5 cmaddox5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow. We really went for the overkill method with this. I think you're right about no screen using disable_sentry. That was originally put in place because one of our screen types (GDS E-Ink maybe?) would crash if it tried to initialize it. Might be a good idea to leave in just in case we get another screen with a similar issue.

@digitalcora digitalcora merged commit db4cbb2 into main Aug 16, 2024
15 checks passed
@digitalcora digitalcora deleted the cfg-simplify-sentry branch August 16, 2024 14:09
@digitalcora
Copy link
Contributor Author

Here is the original context on disable_sentry for posterity: https://app.asana.com/0/1201602028526186/1202958313810860/f

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants