Python agent and Web2py web framework

Web2py is an open-source framework for creating web-based Python applications. You can integrate New Relic with your Web2py app to monitor your app's performance. For general install procedures, see Install New Relic for Python.

Integrate with Web2py

Choose the Web2py set-up you use from the list below for more information:

Runweb2py command

If you run your web application using the runweb2py command, use the following command:

NEW_RELIC_CONFIG_FILE=/some/path/newrelic.ini newrelic-admin run-program runweb2py

newrelic-admin is a script that wraps your application startup, so that New Relic can monitor your application's major functions. For more on running the wrapper script, see Running the wrapper script.

Apache/mod_wsgi

When using Apache/mod_wsgi, you must manually insert code in the WSGI script file you are using in order to initialize the New Relic Python agent. For more info, see the New Relic mod_wsgi documentation.

Gunicorn

For information on using Gunicorn with New Relic, see Python agent and Gunicorn documentation.

uWSGI

For information on using uWSGI with New Relic, see the Python agent and uWSGI documentation.

For general install procedures, see Install the New Relic Python agent.

For more help

Additional documentation resources include:

Join the discussion about Python in the New Relic Online Technical Community! The Technical Community is a public platform to discuss and troubleshoot your New Relic toolset.

If you need additional help, get support at support.newrelic.com.