freshcrate
Home > AI Agents > newrelic

newrelic

New Relic Python Agent

Description

<a href="https://opensource.newrelic.com/oss-category/#community-project"><picture> <source media="(prefers-color-scheme: dark)" srcset="https://github.com/newrelic/opensource-website/raw/main/src/images/categories/dark/Community_Plus.png"> <source media="(prefers-color-scheme: light)" srcset="https://github.com/newrelic/opensource-website/raw/main/src/images/categories/Community_Plus.png"> <img alt="New Relic Open Source community project banner." src="https://github.com/newrelic/opensource-website/raw/main/src/images/categories/Community_Plus.png"> </picture></a> # New Relic Python Agent [![GitHub release](https://img.shields.io/github/v/release/newrelic/newrelic-python-agent?sort=semver)](https://github.com/newrelic/newrelic-python-agent/releases) [![image](https://img.shields.io/pypi/v/newrelic.svg)](https://pypi.python.org/pypi/newrelic) [![image](https://img.shields.io/pypi/pyversions/newrelic.svg)](https://pypi.python.org/pypi/newrelic) [![PyPI Downloads](https://static.pepy.tech/personalized-badge/newrelic?period=total&units=INTERNATIONAL_SYSTEM&left_color=BLACK&right_color=GREEN&left_text=Downloads)](https://pepy.tech/projects/newrelic) [![Tests](https://github.com/newrelic/newrelic-python-agent/actions/workflows/tests.yml/badge.svg?branch=main)](https://github.com/newrelic/newrelic-python-agent/actions/workflows/tests.yml) [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff) [![MegaLinter](https://github.com/newrelic/newrelic-python-agent/actions/workflows/mega-linter.yml/badge.svg?branch=main)](https://github.com/newrelic/newrelic-python-agent/actions/workflows/mega-linter.yml) [![codecov](https://codecov.io/gh/newrelic/newrelic-python-agent/branch/main/graph/badge.svg)](https://codecov.io/gh/newrelic/newrelic-python-agent) [![Secured with Trivy](https://img.shields.io/badge/Trivy-secured-green)](https://github.com/aquasecurity/trivy) The `newrelic` package instruments your application for performance monitoring and advanced performance analytics with [New Relic](http://newrelic.com). Pinpoint and solve Python application performance issues down to the line of code. [New Relic APM](http://newrelic.com/application-monitoring) is the only tool you\'ll need to see everything in your Python application, from the end user experience to server monitoring. Trace problems down to slow database queries, slow 3rd party APIs and web services, caching layers, and more. Monitor your app in a production environment and make sure your app can stand a big spike in traffic by running scalability reports. Visit [Python Application Performance Monitoring with New Relic](http://newrelic.com/python) to learn more. ## Usage This package can be installed via pip: ```bash pip install newrelic ``` (These instructions can also be found online: [Python Agent Installation Guide](https://docs.newrelic.com/install/python/).) 1. Generate the agent configuration file with your [license key](https://docs.newrelic.com/docs/apis/intro-apis/new-relic-api-keys/). ```bash newrelic-admin generate-config $YOUR_LICENSE_KEY newrelic.ini ``` 2. Validate the agent configuration and test the connection to our data collector service. ```bash newrelic-admin validate-config newrelic.ini ``` 3. Integrate the agent with your web application. If you control how your web application or WSGI server is started, the recommended way to integrate the agent is to use the `newrelic-admin` [wrapper script](https://docs.newrelic.com/docs/agents/python-agent/installation-configuration/python-agent-integration#wrapper-script). Modify the existing startup script, prefixing the existing startup command and options with `newrelic-admin run-program`. Also, set the **NEW_RELIC_CONFIG_FILE** environment variable to the name of the configuration file you created above: ```bash NEW_RELIC_CONFIG_FILE=newrelic.ini newrelic-admin run-program $YOUR_COMMAND_OPTIONS ``` Examples: ```bash NEW_RELIC_CONFIG_FILE=newrelic.ini newrelic-admin run-program gunicorn -c config.py test_site.wsgi $ NEW_RELIC_CONFIG_FILE=newrelic.ini newrelic-admin run-program uwsgi uwsgi_config.ini ``` Alternatively, you can also [manually integrate the agent](https://docs.newrelic.com/docs/agents/python-agent/installation-configuration/python-agent-integration#manual-integration) by adding the following lines at the very top of your python WSGI script file. (This is useful if you\'re using `mod_wsgi`.) ``` python import newrelic.agent newrelic.agent.initialize('/path/to/newrelic.ini') ``` 4. Start or restart your Python web application or WSGI server. 5. Done! Check your application in the [New Relic UI](https://rpm.newrelic.com) to see the real time statistics generated from your application. Additional resources may be found here: - [N

Release History

VersionChangesUrgencyDate
12.1.0Imported from PyPI (12.1.0)Low4/21/2026
v12.1.0## Notes This release of the Python agent adds support for time to first token and fixes an incompatible [Flask](https://pypi.org/project/Flask/) `add_url_rule` function signature. Install the agent using `easy_install/pip/distribute` via the [Python Package Index](https://pypi.python.org/pypi/newrelic), using `conda` via the [Conda-Forge Package Index](https://anaconda.org/conda-forge/newrelic), or download it directly from the [New Relic download site](https://download.newrelic.com/pythoMedium3/26/2026
v12.0.0https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-120000/Low3/12/2026
v11.5.0https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-110500/Low2/20/2026
v11.4.0https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-110400/Low1/29/2026
v11.3.0https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-110300/Low1/22/2026
v11.2.0https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-110200/Low12/8/2025
v11.1.0https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-110100/Low11/3/2025
v11.0.1https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-110001/Low10/6/2025
v11.0.0CAUTION: This version of the agent has been yanked. https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-110000/Low9/25/2025
v10.17.0https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-101700/Low9/4/2025
v10.16.0https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-101600/Low8/14/2025
v10.15.0https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-101500/Low7/24/2025
v10.14.0https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-101400/Low6/18/2025
v10.13.0https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-101300/Low6/9/2025
v10.12.0https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-101200/Low5/12/2025
v10.11.0https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-101100/Low5/1/2025
v10.10.0https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-101000/Low4/24/2025
v10.9.0https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-100900/Low4/11/2025
v10.8.1https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-100801/Low3/31/2025
v10.8.0https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-100800/ Low3/27/2025
v10.7.0https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-100700/Low3/7/2025
v10.6.0https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-100600/Low2/6/2025
v10.5.0https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-100500/Low1/30/2025
v10.4.0https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-100400/Low12/12/2024
v10.3.1https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-100301/Low11/25/2024
v10.3.0https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-100300/Low11/19/2024
v10.2.0https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-100200/Low10/15/2024
v10.1.0https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-100100/Low10/10/2024
v10.0.0https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-100000/Low9/26/2024
v9.13.0https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-91300/Low8/8/2024
v9.12.0https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-91200/Low7/11/2024
v9.11.0https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-91100/Low6/13/2024
v9.10.0https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-91000/Low5/23/2024
v9.9.1https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-90901/Low5/13/2024
v9.9.0https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-90900/Low4/18/2024
v9.8.0https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-90800/Low3/27/2024
v9.7.1https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-90701/Low3/11/2024
v9.7.0https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-90700/Low2/22/2024
v9.6.0https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-90600/Low1/25/2024
v9.5.0https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-90500/Low1/12/2024
v9.4.0https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-90400/Low1/8/2024
v9.3.0https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-90300/Low12/6/2023
v9.2.0https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-90200/Low11/16/2023
v9.1.2https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-90102/Low11/13/2023
v9.1.1https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-90101/Low10/19/2023
v9.1.0https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-90100/Low9/25/2023
v9.0.0https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-90000/Low8/28/2023
v8.11.0https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-81100/Low8/23/2023
v8.10.1https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-81001/Low8/17/2023
v8.10.0https://docs.newrelic.com/docs/release-notes/agent-release-notes/python-release-notes/python-agent-81000/ Low8/10/2023

Dependencies & License Audit

Loading dependencies...

Similar Packages

cogamesMulti-agent cooperative games0.25.7
e2bE2B SDK that give agents cloud environments2.20.0
a2a-sdkA2A Python SDK1.0.0
aws-cdk-asset-node-proxy-agent-v6@aws-cdk/asset-node-proxy-agent-v62.1.1
strands-agentsA model-driven approach to building AI agents in just a few lines of code1.36.0