Commit Graph

61 Commits

Author SHA1 Message Date
allenhu beb980d4cc fix the puzzle try..catch in contrib.django.models's get_client 2014-06-23 11:17:08 +08:00
Alex Gaynor c0dedcd29d Fixed several typos 2014-05-10 11:14:16 -07:00
Daniel Hahler adadf1f548 DjangoClient: use fallback in case of ImportError of client
This fixes `AttributeError: 'NoneType' object has no attribute 'split'`
from the WSGI stack, because Sentry itself does not handle internal
exceptions properly.

This makes sure that the DjangoClient is valid, falling back to the
previously used one (in case a temporary client is given/requested), or
to the default client (typically ignoring the wrong user setting).

The ImportError gets logged (with an exception).

I would rather like to not catch the ImportError here, but make Sentry
handle it. On the other hand, it's the responsibility of DjangoClient to
provide a valid client object.

Fixes #433 (https://github.com/getsentry/raven-python/issues/433).
2014-03-18 16:37:40 +01:00
David Cramer 8d680b5969 Support for atomic transactions (Django 1.6) 2013-11-28 02:20:16 -08:00
David Cramer cd4ce2e0ee Add module and expression matching to SENTRY_IGNORE_EXCEPTIONS 2013-07-17 08:59:51 -07:00
Xavier Ordoquy ea92d95281 Revert "fixed indent bug"
This reverts commit ba863065bf.
2013-07-12 10:23:33 +02:00
Dave Hunter ba863065bf fixed indent bug 2013-07-11 17:44:30 +01:00
David Cramer 317bb09d90 Merge pull request #321 from rogerhu/circular_reference
Avoid creating circular reference cycles by sidestepping the use of a local variable to sys.exc_info[2]
2013-06-21 11:13:50 -07:00
David Cramer 7035c7e2b3 3.3.9 2013-06-15 14:15:13 -07:00
Roger Hu 7857abb29c Avoid creating circular reference cycles by sidestepping the use of a local variable to sys.exc_info[2].
This avoids the need to rely on the Python garbage collector to detect and remove unreachable cycles.

See: https://code.djangoproject.com/ticket/10758#no1

Also see: https://code.djangoproject.com/attachment/ticket/10758/patch.diff
2013-06-10 17:30:50 -07:00
David Cramer ffe4e4bd84 Clean up sys.exc_info behavior 2013-05-06 00:57:29 -07:00
David Cramer b8f7bccac6 Fail gracefully when Celery imports error out 2013-04-24 10:50:38 -07:00
Xavier Ordoquy c7b76788f4 Moved six and long occurence as noqa because of python3. 2013-04-24 02:11:29 +02:00
Xavier Ordoquy e1cc23af78 Fix an weird __import__ behavior (fromlist arg must be a string with python 2.x, no unicode). 2013-04-05 17:55:11 +02:00
Xavier Ordoquy 90b5846a06 Python3 port ! 2013-04-01 23:23:03 +02:00
Jayanth Raman 02ddbb4e15 * simplify get_installed_apps 2013-03-29 09:59:14 -07:00
Xavier Ordoquy 525778d476 Use six and compat module to provide a python3 compatibility. 2013-03-29 00:14:19 +01:00
Xavier Ordoquy 8bba42b4d5 Use new style exceptions. 2013-03-17 09:11:26 +01:00
David Cramer 697e41574c Correct ProxyClient.__repr__ behavior 2013-02-13 12:47:27 -08:00
David Cramer 0963340b20 Dont use weakref on signal (fails in Sentry core) 2013-02-10 13:54:17 -08:00
David Cramer 2f820e0cf3 One day we will get things right 2013-01-28 21:43:16 -08:00
David Cramer 9713849d2c Improve how we register SentryHandler within Celery 2013-01-24 13:47:36 -08:00
David Cramer 3f59b9cd7d Improve how we install the exception handler for sentry vs non sentry installs 2013-01-15 18:08:01 -08:00
David Cramer 4431729220 missing import for registering handlers 2013-01-15 17:40:15 -08:00
David Cramer 4c6c90771c Support context in Django 2013-01-09 11:54:29 -08:00
David Cramer fcc34abbe0 Support SENTRY_IGNORE_EXCEPTIONS in Django as a solution for the removed skip_sentry behavior 2012-12-26 13:45:27 -08:00
David Cramer afbde25e28 Add basic tests for sentry_exception_handler 2012-12-26 13:40:24 -08:00
David Cramer 05a9f8f289 Always enable error handlers in Django 2012-12-19 20:53:52 -08:00
David Cramer 388a222937 Correct all current lint violations 2012-11-23 13:08:49 -08:00
David Cramer 9291ab2689 Add compatibility module for Django (fixes GH-175) 2012-11-23 13:03:51 -08:00
Craig de Stigter 62998aef6d avoid deprecation warnings on django 1.5 due to django.utils.hashcompat import 2012-11-01 13:12:12 +13:00
David Cramer 443a73ccbe Maintain import paths for integrations and force import into __init__ 2012-10-30 21:27:55 -07:00
David Cramer 379adb5799 Move raven imports into raven.contrib.django (fixes gunicorn command) 2012-10-30 21:20:34 -07:00
David Cramer 13260b0f5b its not 2010 anymore 2012-10-12 10:45:59 -07:00
Xavier Ordoquy 7e874ae452 Replace SENTRY_DEBUG switch by RAVEN_CONFIG['register_signals'] 2012-08-07 13:25:59 +02:00
David Cramer 502b05bbee New style configuration using RAVEN_CONFIG and register_signals option 2012-07-08 13:10:45 +02:00
David Cramer 1e0e18d1cc Initial work on extendable serializers 2012-07-05 11:38:10 +02:00
David Cramer 69306e29da Fail gracefully if we cant install django-celery hook 2012-05-18 13:28:37 -07:00
Luper Rouch cf65ef7389 removed useless check for the 'skip_sentry' attribute on exception type 2012-05-12 13:13:08 +02:00
Luper Rouch 6aa38d38c7 Checking for 'skip_sentry' attribute on both exception type and instance 2012-05-12 13:13:52 +03:00
David Cramer 69c5fa6338 Support for Celery signal handling
This does several things:

1. It removes the use of get_client() throughout the codebase (Django)
   and replaces it with a new proxy object.

2. Adds register_signal(client) to raven.contrib.celery

3. Automatically registers the Celery signal if djcelery and raven.contrib.django
   are installed.
2012-05-01 14:41:06 -07:00
David Cramer c61713f315 Correct max length settings in Django 2012-04-19 15:15:31 -07:00
David Cramer c342c9e7dc Fix Django client with DSN (fixes GH-58) 2012-02-03 12:15:23 -08:00
David Cramer 32bbbf9cd9 Django can now be configured by setting SENTRY_DSN 2012-02-02 13:13:39 -08:00
David Cramer 46f42f9e87 pep8 2012-01-30 00:30:31 -08:00
David Cramer b57ef420ea Django client can now be configured via SENTRY_DSN setting 2012-01-29 21:13:43 -08:00
David Cramer eb9dcfb96c Support PUBLIC_KEY and SECRET_KEY settings for Django 2012-01-13 00:26:53 -08:00
David Cramer ca9fa33f6a Merge branch 'master' into 2.0 2011-12-27 23:27:06 -08:00
David Cramer 7abdf4f14d Dont reference a non existant variable (SENTRY_DEBUG) 2011-12-27 23:27:00 -08:00
David Cramer 83386e2e6b Add support for headers to the Http interface in Flask and Django 2011-12-23 23:24:58 -08:00