Introduction to New Relic for Python

Our Python agent monitors your Python application to help you identify and solve performance issues. You can also extend your performance monitoring to collect and analyze business data to help you improve the customer experience and make data-driven business decisions. With flexible options for custom instrumentation and APIs, The Python agent offers multiple building blocks to customize the data you need from your app.

Our Python works with a wide variety of web frameworks and hosting mechanisms, including Django, Gunicorn, WSGI, CherryPy, uWSGI, and more. You can also install the Python agent in a Google App Engine flexible environment.

Monitor app performance

After you install the Python agent, it begins to collect data about your app. You can view the data as charts and tables in New Relic One.

View the big picture of your app.

Find errors and problems quickly.

Drill down into performance details.

Other helpful tools include:

Tools Description
Browser monitoring Integrate the Python agent with Browser monitoring to gain visibility into end-user browser activity.
Simple scripts and background tasks Monitor job-based or task queuing systems, like Celery, or other standalone non-web functions.
Business data analysis with data exploration.

Use the Python agent with our data explorer to organize, query, and visualize your data to answer key questions about application performance and customer experience.

Install the Python agent

Before you install the Python agent, make sure your system meets the system requirements. You must also create a New Relic account.

We support a number of web frameworks and libraries right out of the box, including Django, WSGI, and Gunicorn. If you use one of the supported web frameworks, installation is easy. If you use an unsupported framework, the process will involve some additions to your app code and/or web server files.

For a quick and simple install process that will work for the majority of setups, follow these simple steps:

  1. Download and install the Python package
  2. Create config file
  3. Integrate the Python agent with your application

Monitor non-web scripts, background tasks, and functions

The Python agent also lets you monitor non-web scripts, worker processes, tasks, and functions. The installation process for these non-web transactions is similar to the one used for a web app, with one major difference: instead of going through the standard integration process described in the install instructions, you would manually "wrap" any function you want to monitor. For more information, see Non-web tasks and processes. For instructions on monitoring Celery tasks, see Celery background tasks.

What's next after installation?

Once you get the agent up and running, some suggested next steps are:

Troubleshooting

After you complete the install process, your data should appear in the APM UI within five minutes. If it does not, use these troubleshooting resources:

Check the source code

The Python agent is open source software. That means you can browse its source code and send improvements, or create your own fork and build it. For more information, see the README.

For more help

If you need more help, check out these support and learning resources: