Skip to content

Commit

Permalink
Merge pull request #76 from osuosl/tschuy/add-sentry
Browse files Browse the repository at this point in the history
add sentry/raven support
  • Loading branch information
tschuy committed Sep 29, 2015
2 parents 50d5e74 + dd7f009 commit 1443ca6
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
12 changes: 12 additions & 0 deletions docs/source/getting_started/configuring.rst
Expand Up @@ -248,6 +248,18 @@ An example of this setting might be::

More details can be found in the :ref:`search <search>` documentation.

Sentry
------

|gwm| can log server errors to `Sentry`_, an online exception tracker. To enable
tracking, copy the ``raven.py.dist`` settings file to ``raven.py`` and set the
``dsn`` value. If you are using hosted Sentry, you can get the ``dsn`` value by
logging into your Sentry account and copying it directly from
`their documentation`_.

.. _`Sentry`: https://www.getsentry.com/welcome/
.. _`their documentation`: https://docs.getsentry.com/hosted/clients/python/integrations/django/

Other settings
--------------

Expand Down
6 changes: 6 additions & 0 deletions ganeti_webmgr/ganeti_web/settings/__init__.py
Expand Up @@ -22,3 +22,9 @@
from .ldap_settings import *
except ImportError:
pass

try:
from .raven import *
INSTALLED_APPS = update_installed(INSTALLED_APPS)
except ImportError:
pass
9 changes: 9 additions & 0 deletions ganeti_webmgr/ganeti_web/settings/raven.py.dist
@@ -0,0 +1,9 @@
import raven

def update_installed(apps):
return apps + ('raven.contrib.django.raven_compat',)

RAVEN_CONFIG = {
'dsn': 'https://key:secret@app.getsentry.com/project',
'release': 'master',
}

0 comments on commit 1443ca6

Please sign in to comment.