All Projects → Bouke → django-airbrake

Bouke / django-airbrake

Licence: other
Django Airbrake provides a logging handler to push exceptions and other errors to airbrakeapp or other airbrake-compatible exception handler services (e.g. aTech Media's Codebase).

Programming Languages

python
139335 projects - #7 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to django-airbrake

airbrake-django
A Django project for Airbrake
Stars: ✭ 29 (+70.59%)
Mutual labels:  airbrake
Errbit
The open source error catcher that's Airbrake API compliant
Stars: ✭ 4,172 (+24441.18%)
Mutual labels:  airbrake
redux-airbrake
Redux middleware for Airbrake error logging
Stars: ✭ 20 (+17.65%)
Mutual labels:  airbrake
airbrake-laravel
Laravel package for the Airbrake API, which supports Errbit
Stars: ✭ 16 (-5.88%)
Mutual labels:  airbrake
laravel-airbrake
Laravel service provider for Airbrake https://github.com/airbrake/phpbrake
Stars: ✭ 25 (+47.06%)
Mutual labels:  airbrake

Django Airbrake

Build Status Test Coverage PyPI

Django Airbrake provides a logging handler to push exceptions and other errors to airbrakeapp or other airbrake-compatible exception handler services (e.g. aTech Media's Codebase).

Compatible with all supported Django (LTS) versions. At the moment of writing that's including 1.11 and 2.0 on Python 2.7(only django1.11), 3.4, 3.5 and 3.6.

Installation

Installation with pip:

$ pip install django-airbrake

Add 'airbrake.handlers.AirbrakeHandler' as a logging handler:

LOGGING = {
    'version': 1,
    'disable_existing_loggers': False,
    'filters': {
        'require_debug_false': {
            '()': 'django.utils.log.RequireDebugFalse'
        }
    },
    'handlers': {
        'airbrake': {
            'level': 'WARNING',
            'class': 'airbrake.handlers.AirbrakeHandler',
            'filters': ['require_debug_false'],
            'api_key': '[your-api-key]',
            'env_name': 'develop',
        }
    },
    'loggers': {
        'django.request': {
            'handlers': ['airbrake'],
            'level': 'WARNING',
            'propagate': True,
        },
    }
}

Settings

level (built-in setting) Change the level to 'ERROR' to disable logging of 404 error messages.

api_key (required)
API key provided by the exception handler system.
env_name (required)
Name of the environment (e.g. production, develop, testing)
api_url
To use aTech Media's Codebase exception system, provide an extra setting api_url with the value 'https://exceptions.codebasehq.com/notifier_api/v2/notices'.
env_variables
List of environment variables that should be included in the error message, defaults to ['DJANGO_SETTINGS_MODULE'].
meta_variables
List of request.META variables that should be included in the error message, defaults to ['HTTP_USER_AGENT', 'HTTP_COOKIE', 'REMOTE_ADDR', 'SERVER_NAME', 'SERVER_SOFTWARE'].
timeout
Timeout in seconds to send the error report, defaults to 30 seconds.

Contributing

  • Fork the repository on GitHub and start hacking.
  • Run the tests.
  • Send a pull request with your changes.

Releasing

The following actions are required to push a new version:

bumpversion [major|minor|patch]
python setup.py sdist bdist_wheel upload
git push && git push --tags
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].