• Log in

Update the Python agent

To take full advantage of our latest features, enhancements, and important security patches, we recommend you update your Python agent to the latest version. For additional information about specific agent updates, refer to the Python agent release notes.

Update with Python package index (PyPi)

The Python agent package is listed on PyPi at http://pypi.python.org/pypi/newrelic. To update with a specific package, follow the corresponding instructions:

Python package

Installation procedures


To update the newrelic package directly from PyPi, run:

pip install --upgrade newrelic

If you have New Relic in your requirements.txt file, you can do a mass update of all required packages by running:

pip install -r requirements.txt


To update using easy_install, run:

easy_install --upgrade newrelic


We recommend using pip rather than using easy_install, because pip will correctly remove old versions when updating the agent software.


Install the package by creating an appropriate section for the newrelic package using the zc.recipe.egg recipe.

Download package manually

To manually download the New Relic Python package:

  1. Remove the current New Relic package.
  2. Download the new package, then follow the Python agent installation procedures.


We recommend using pip rather than using manual installation, because pip will correctly remove old versions when updating the agent software.

Python agent versions not supported

End of life notification: As of January 26, 2015, we will no longer accept data from Python agent versions earlier than 2.42.0.

These agent versions use an out-of-date protocol when communicating with our data collection services. In addition, many of these versions contain a potential security issue where they may incorrectly send sensitive data to our data collector.

Update unsupported agent versions


If you are updating from an older agent version, including major version jumps, review the following list for changes in functionality.


Comments and higher

Release notes: Python agent

Manual override for the path to your local CA bundle. This CA bundle will be used to validate the SSL certificate presented by our data collection service. Set with the Python agent config file.

Release notes: Python agent

Previously deprecated APIs removed:

  • Transaction.add_user_attribute (use Transaction.add_custom_parameter)

  • Transaction.add_user_attributes (use Transaction.add_custom_parameters)

  • wrap_callable (use FunctionWrapper)

    Removed support for Python 2.6 and Python 3.3:

    Python 2.6 and Python 3.3 are no longer supported. Recommendation: Update your application to a supported version of Python in order to continue to receive updates to the Python agent.

    Python versions 2.6 and 3.3:

    These are supported only by Python agent versions or lower.

Release notes: Python agent

Previously deprecated APIs removed:

  • transaction (use current_transaction)

  • name_transaction (use set_transaction_name)

  • Application.record_metric (use Application.record_custom_metric)

  • Application.record_metrics (use Application.record_custom_metrics)

  • Transaction.record_metric (use Transaction.record_custom_metric)

  • Transaction.name_transaction (use Transaction.set_transaction_name)

    Deprecated APIs:

  • Transaction.add_user_attribute has been deprecated in favor of Transaction.add_custom_parameter. Transaction.add_user_attribute will be removed in a future release.

  • Transaction.add_user_attributes has been deprecated in favor of Transaction.add_custom_parameters. Transaction.add_user_attributes will be removed in a future release.

  • wrap_callable has been deprecated in favor of FunctionWrapper. wrap_callable will be removed in a future release.

  • data-source admin command: The platform API (used by newrelic-admin data-source) has been removed. Please use data sources in place of the platform API.

Release notes: Python agent


Disabling SSL connections has been deprecated. SSL connections are enabled by default. In a future release, the option to disable SSL will be removed.

Release notes: Python agent

Deprecated config settings:

Several configuration settings have been deprecated. The most commonly used of the deprecated settings are capture_params and ignored_params. To achieve the same functionality as the old settings, use the new attributes.include and attributes.exclude settings.

Release notes: Python agent

Deprecated API:

Do not use the agent API function add_user_attribute(), which is now deprecated. Instead, use the add_custom_parameter() function.

Optional: To display these parameters in browser traces, enable the browser_monitoring.capture_attributes agent configuration setting.

At or below 2.0.0

Proxy settings:

Python agent versions 2.0.0 or earlier do not provide the proxy_scheme setting, and the protocol scheme defaults to http or https depending on whether SSL is disabled or enabled.

If you are updating from an older agent version and your config file doesn't include proxy_scheme, ensure you add the setting and set it appropriately. If you don't, the agent will continue to base the protocol scheme on the SSL setting for backwards compatibility.

Proxies are usually only configured to accept proxy requests via the http protocol scheme. If you do not set proxy_scheme, this may result in a failure.

Release notes: Python agent

Thread profiling for WSGI servers:

We have disabled the ability to get thread profiling information when a WSGI server uses coroutine libraries such as gevent or eventlet. This is because, due to the nature of how coroutines are implemented, we are not able to generate accurate usable data.

Release notes: Python agent

Attributes from WSGI requests:

Attributes captured from WSGI request environments such as REQUEST_METHOD, HTTP_REFERER, and HTTP_USER_AGENT now appear in the UI under the Request environment category in error details and slow transaction traces. Previously they appeared in the UI under Custom parameters.

Copyright © 2022 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.