Adding NewRelic to a Flask app

pip install newrelic

into the python venv.

Modify the uwsgi upstart script to use:

--single-interpreter

Make a newrelic.ini file for the app:

newrelic-admin generate-config LICENSE-KEY newrelic.ini

Edit the .py file adding this to the top:

import newrelic.agent 
newrelic.agent.initialize('/some/path/newrelic.ini', 'app1')


Posted by JB Uy on August 24, 2013 at 07:00 PM UTC
Edited on December 13, 2013 at 08:45 PM UTC
Public Comments
comments powered by Disqus