Skip to content

Minor fixes #6

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

Merged
2 commits merged into from
Sep 8, 2010
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 26 additions & 24 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -66,29 +66,11 @@ Finally, run ``python manage.py syncdb`` to create the database tables.

(If you use South, you'll need to use ``python manage.py migrate sentry``)

=============
Configuration
=============
==========================
Multi-server configuration
==========================

Several options exist to configure django-sentry via your ``settings.py``:

#######################
SENTRY_CATCH_404_ERRORS
#######################

Enable catching of 404 errors in the logs. Default value is ``False``::

SENTRY_CATCH_404_ERRORS = True

You can skip other custom exception types by adding a ``skip_sentry = True`` attribute to them.

#################
SENTRY_REMOTE_URL
#################

If you run on a multi server environment we highly recommend this method for storing error logs.

This is a two step process. First you'll want to configure your Sentry server (not your application)::
To configure Sentry for use in a multi-server environment, first you'll want to configure your Sentry server (not your application)::

INSTALLED_APPS = [
...
Expand All @@ -97,21 +79,41 @@ This is a two step process. First you'll want to configure your Sentry server (n
'sentry',
'sentry.client',
]

SENTRY_KEY = '0123456789abcde'

And on your main application, you need to add ``sentry.client``::
And on each of your application servers, specify the URL of the Sentry server, add ``sentry.client`` to ``INSTALLED_APPS``, and specify the same key used in your Sentry server's settings::

# This should be the absolute URI of sentries store view
SENTRY_REMOTE_URL = 'SENTRY_URL_BASE/store/'
SENTRY_REMOTE_URL = 'http://your.sentry.server/sentry/store/'

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

SENTRY_KEY = '0123456789abcde'

You may also specify an alternative timeout to the default (which is 5 seconds) for all outgoing logging requests::

SENTRY_REMOTE_TIMEOUT = 5

===========================
Other configuration options
===========================

Several options exist to configure django-sentry via your ``settings.py``:

#######################
SENTRY_CATCH_404_ERRORS
#######################

Enable catching of 404 errors in the logs. Default value is ``False``::

SENTRY_CATCH_404_ERRORS = True

You can skip other custom exception types by adding a ``skip_sentry = True`` attribute to them.

#####################
SENTRY_DATABASE_USING
#####################
Expand Down
8 changes: 0 additions & 8 deletions sentry/tests/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -567,14 +567,6 @@ def testBadData(self):
self.assertEquals(resp.status_code, 403)
self.assertEquals(resp.content, 'Bad data')

def testBadData(self):
resp = self.client.post(reverse('sentry-store'), {
'key': settings.KEY,
'data': 'hello world',
})
self.assertEquals(resp.status_code, 403)
self.assertEquals(resp.content, 'Bad data')

def testCorrectData(self):
kwargs = {'message': 'hello', 'server_name': 'not_dcramer.local', 'level': 40}
data = {
Expand Down