This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

This package provides a Django middleware class that attaches custom attributes to the stack trace that the New Relic agent sends to your console. For example, if a server error occurs you may wish to know the username of the user who received it.


Install via pip:

$ pip install django-newrelic-extensions

Or from Github:

$ pip install -e git://

Add the middleware class to your MIDDLEWARE_CLASSES:


And then add your settings.


  • NEW_RELIC_EXTENSIONS_ENABLED: This allows you to disable the extensions during development. (Default: False)
  • NEW_RELIC_EXTENSIONS_DEBUG: This enables the extensions but instead of sending trace backs to New Relic, it prints them out to the console. (Default: True)
  • NEW_RELIC_EXTENSIONS_ATTRIBUTES: This is how you specify what attributes of the Django HttpRequest instance you care about. This should be a dict. Please see below for examples.


    'user': {
        'username': 'Django username',
        'is_superuser': 'Django super user'
    'is_secure': 'Django secure conneciton',
    'something random': 'Name'

This will log the user’s username under the key of Django username and so on. If a variable is callable (like is_secure above), it will be called. If it doesn’t exist, it will silently die (unless you have debug on).

For a list of examples attributes that you can log, see the HttpRequest docs.

To learn more about New Relic’s Python integration, please see their Python tips and tricks page.


BSD, short and sweet.

Release History

Release History


This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
django-newrelic-extensions-0.0.1.tar.gz (3.7 kB) Copy SHA256 Checksum SHA256 Source Mar 6, 2012

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting