fix: Disable sentry based on if in local development or not - #625
Merged
Merged
Conversation
|
costowell
reviewed
Oct 2, 2026
costowell
left a comment
Contributor
There was a problem hiding this comment.
IMO just check if it's unset/the empty string to disable sentry. The "local-development" special value is redundant if the empty string also achieves the same behavior.
|
|
||
| ### Using Sentry | ||
| If you want to opt-into logging errors through Sentry then set the `CONDITIONAL_SENTRY_ENV` environment variable to anything other than `local-development`. | ||
| Setting it to `local-development` or having the environment variable unset disables Sentry in both the frontend and backend (Re-building the container may be required). |
Contributor
There was a problem hiding this comment.
"Or having the environment variable unset"
Is this true?
Contributor
Author
There was a problem hiding this comment.
setting it to local-development disables sentry, if you don't set the variable it will default to local-development (it already defaulted to that). Is my phrasing confusing?
BigSpaceships
merged commit Oct 2, 2026
18ea5d3
into
ComputerScienceHouse:develop
2 of 3 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
what the PR changes
Disables sentry if the environment variable
CONDITIONAL_SENTRY_ENVis exactly"local-development"(default value).Why
why these changes were made
Because I accidentally flooded #monitoring with sentry errors from my local environment so it was decided to have it disabled as the default.
Test Plan
how did you verify these changes did what you expected
I tried to test all the possible ways the env variable could be set and in the different contexts... but I only had like a 10% success rate when trying to display a new env variable after updating it 💀. So please test with whatever conditions you think will be encountered as I could have failed miserably and not known it.
Env Vars
did you add, remove, or rename any environment variables
No
Documentation
did you add or update any documentation. PRs should, at the minimum, update documentation when they make existing documentation out of date.
No
Checklist