Update the Python agent

To take full advantage of New Relic's 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 New Relic 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
pip

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
easy_install

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.

buildout 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, New Relic 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 New Relic's data collection services. In addition, many of these versions contain a potential security issue where they may incorrectly send sensitive data to the New Relic 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.

Migration Comments
4.2.0.100 and higher

Release notes: Python agent 4.2.0.100

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

4.0.0.99

Release notes: Python agent 4.0.0.99

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 3.4.0.95 or lower.

3.0.0.89

Release notes: Python agent 3.0.0.89

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.notice_error (use Transaction.record_exception)
  • 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.

2.104.0.86

Release notes: Python agent 2.104.0.86

SSL:

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

2.56.0.42

Release notes: Python agent 2.56.0.42

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.

2.10.0.8

Release notes: Python agent 2.10.0.8

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.

1.11.0.55

Release notes: Python agent 1.11.0.55

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.

1.0.3.138

Release notes: Python agent 1.0.3.138

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.

For more help

Recommendations for learning more: