Thanks, worked like a charm!
I'm using Bottlepy as my web app framework, so I just needed to do the following:
Code:
newrelic_ini = '/newrelic.ini'
try:
import newrelic.agent
newrelic.agent.initialize(newrelic_ini, 'production')
application = newrelic.agent.WSGIApplicationWrapper(bottle.default_app())
except:
print 'newrelic agent not found... continuing anyways'
application = bottle.default_app()
Note: I had to follow the instructions here (
http://www.julianbez.com/blog/2013/07/2 ... -pangolin/) in order to get the latest version of uWSGI in order for the New Relic Python Agent to work. apt-get only gives you version 1.0.3 which is not supported. I then had to update my .xml config file in the /etc/uwsgi/apps-available directory to replace deprecated config options:
Replaced
Code:
<app mountpoint="/">
<script>wsgi_configuration_module</script>
</app>
with
Code:
<module>wsgi_configuration_module</module>