How can i disable sentry for my localhost and testserver in django 1.7?

1,735 views
Skip to first unread message

Vlad Lep

unread,
Jan 16, 2015, 7:24:23 AM1/16/15
to gets...@googlegroups.com
Hi,

I use the sentry client for django and also the javascript one for my project.
I would like to find a way to disable in nicely on my localhost, not to see all the errors that appear during development. 
I noticed i can set my RAVEN_CONFIG = { } empty in the localhost settings and that would solve the issue partly. The problem is that then i constantly see a javascript error in the console which also hides real js erorrs when i develop.

also used this version:
if 'DISABLED_APPS' in locals():
    INSTALLED_APPS = [k for k in INSTALLED_APPS if k not in DISABLED_APPS]

    MIDDLEWARE_CLASSES = list(MIDDLEWARE_CLASSES)
    TEMPLATE_CONTEXT_PROCESSORS = list(TEMPLATE_CONTEXT_PROCESSORS)

    for a in DISABLED_APPS:
        for x, m in enumerate(MIDDLEWARE_CLASSES):
            if m.startswith(a):
                MIDDLEWARE_CLASSES.pop(x)

        for x, m in enumerate(TEMPLATE_CONTEXT_PROCESSORS):
            if m.startswith(a):
                TEMPLATE_CONTEXT_PROCESSORS.pop(x)

DISABLED_APPS = ['sentry.client', 'sentry']

This does not work now anymore once i updated to djnago 1.7
Is there an elegant way to do this?
Thanks.

David Cramer

unread,
Jan 16, 2015, 2:39:38 PM1/16/15
to gets...@googlegroups.com
The code sample you’re showing lists ‘sentry’ as an app, which it shouldn’t be.

If you unset the DSN it should disable all reporting, and thats the recommended way of handling it.
--
You received this message because you are subscribed to the Google Groups "sentry" group.
To unsubscribe from this group and stop receiving emails from it, send an email to getsentry+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages