Comments (12)
As a hack, I just put in an invalid SENTRY_REMOTE_URL in my localsettings.py file:
SENTRY_REMOTE_URL = ['http://localhost/', ]
That is enough to stop my development box from sending the errors in.
from sentry.
I can easily do this within runtests.py, but not your own test suite. The problem is I can't determine whether you're running tests or not.
from sentry.
Is there a way to remove Sentry from settings.INSTALLED_APPS during testing? The database creation dies while trying to run a migration. I tried the following at the top of my test suite:
remove_for_testing = ['sentry', 'sentry.client']
new_apps = []
for app in settings.INSTALLED_APPS:
if app not in remove_for_testing:
new_apps.append(app)
settings.INSTALLED_APPS = tuple(new_apps)
but it looks like it runs too late, as South's migration manager still runs and complains there's no app named "Sentry".
from sentry.
If there was a settings.py variable set to specify whether to send errors to Sentry, you could turn off sentry logging at the top of your tests.py file. Might be a little crude in that you could technically modify the settings once in any test.py file, but until there is a django test specific settings file, not too sure what else to do.
We currently specify a separate test_settings.py file where we remove sentry (and related) from the INSTALLED_APPS. It works well enough for our Hudson instance, but is kind of a pain on your development box.
from sentry.
I will add a toggle to flat out disable sentry (though it may just be specifying the client as dummy). What we do locally is have our settings.py remove sentry/sentry.client from INSTALLED_APPS.
from sentry.
I'm happy to just do that rather than make you work around me. Can you just explain how you do that, since my code sample above isn't succeeding? Thanks.
from sentry.
tclancy, wrote this up real quick: http://justcramer.com/2011/01/13/settings-in-django/
from sentry.
That's awesome, thanks so much. It's usually just me, so I get away with the local_settings.py file, but that's good stuff.
from sentry.
Shouldn't this be closed?
from sentry.
Yes, it should :)
from sentry.
Totally lazy person's solution: rename/ delete/ move Sentry's /migrations folder.
from sentry.
And 12 seconds later, an actual, mature fix for the problem I was having: SOUTH_TESTS_MIGRATE = False in your settings file.
from sentry.
Related Issues (20)
- Login with Okta SSO still asks for credentials HOT 3
- Update upsert logic to prevent monitors from switching projects when different DSNs are used for the same slug
- [Replay Details] Show a "privacy config" flyout to help explain pII stripping to users HOT 1
- Spread out samples across time range + value
- GitHub CodeOwners based Issue Assignment not working HOT 4
- Update Sandbox for Additional Replay Features - Req and Res Bodies HOT 2
- Don't add priority activity entry if priority doesn't change
- There is no valid electron symbol debug file in self hosted sentry HOT 10
- Inviting members for new org has error HOT 2
- [Inbound Filters] Block User-Agents HOT 6
- [Inbound Filters] Extend the SSR-Hydration Filter to Angular HOT 5
- Add Deno Icon Runtime Icon HOT 2
- Can not view Children Transactions of Autogrouped spans. HOT 3
- Allow creating alerts and filtering by team HOT 7
- Add crash report API instructions for pure backend platforms on UF sidebar
- Control Asana HOT 3
- Project counters get stuck and projects can't create new issues HOT 2
- Review TeamAlerts endpoints to publish or make private
- Review OrganizationIncident endpoints to publish or make private
- Sentry spams idle connections to postgresql and it fails with too many connections HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sentry.