Quick start guide: monitoring Django on Heroku

PythonWe were stoked to see our friends at Heroku announce their public beta for Python. Having just announced our own public beta for our Python agent, we thought folks might want to get started with monitoring Django apps right away so we created a new ‘how to” guide on our support site. Here’s a short checklist of items covered in the article:

  1. Prep & opt in
    Get your Django app running on Heroku using gunicorn described here, then opt into New Relic in the “Add-ons” section.
  2. Tell Heroku to install New Relic
    Add one line to your requirements.txt (in your project’s root directory) that just says newrelic
  3. Initialize
    Modify the web entry in your Procfile to start with bin/newrelic-admin run-program like this:
    web: bin/newrelic-admin run-program bin/python hellodjango/manage.py run_gunicorn -b "$PORT" -w 3

New Relic works out of the box on Django, Flask and Bottle. If you’re not on one of those frameworks you may need need to follow specific instructions in our support article to enable the Python agent. If after following the instructions you find that the agent isn’t sending any data, we may ask you to send us a copy of the Python agent log file, which is captured in the Heroku web server log. Detailed instructions are available in our support article.

As always, if you have any questions, concerns or feedback, visit New Relic support. Happy monitoring!


View posts by .

Interested in writing for New Relic Blog? Send us a pitch!