중요
The end-of-life date for this agent version is July 29, 2019. To update to the latest agent version, see Update the agent. For more information, see End-of-life policy.
Notes
This release of the Python agent is a hot fix version to address a Celery instrumentation issue introduced with version 2.2.0.2.
The agent can be installed using easy_install/pip/distribute via the Python Package Index or can be downloaded directory from our download site.
For a list of known issues with the Python agent see our online help article on the status of the Python agent.
Bug fixes/Improvements:
- Fixed bug with Celery instrumentation introduced with version 2.2.0.2 of the agent. The bug was causing a Python exception to be raised when the instrumentation was trying to derive the task name to use as the name of the background task.
중요
The end-of-life date for this agent version is July 29, 2019. To update to the latest agent version, see Update the agent. For more information, see End-of-life policy.
Notes
This release of the Python agent is an incremental release and includes minor feature changes and enhancements.
The agent can be installed using easy_install/pip/distribute via the Python Package Index or can be downloaded directory from our download site.
For a list of known issues with the Python agent see our online help article on the status of the Python agent.
New Features:
- Use of HTTP proxies over SSL using the HTTP CONNECT tunnelling mechanism is now supported. Set the 'proxy_scheme' to 'http' to invoke this mode. This will become the default in a future version of the agent. If migrating from an older agent version and need to keep the existing behaviour going forward, set 'proxy_scheme' to 'https'. Alternatively, ensure you provide the scheme in the form of a URI as part of the 'proxy_host' setting.
- Added request queueing support to the instrumentation for the Tornado ASYNC framework. Request queueing times should start showing in the APM Overview page when a frontend web server such as Nginx, has been configured to add the appropriate headers. For more details see our documentation on setting up tracking of queueing time.
- The 'newrelic.agent.record_exception()' can now be called without actually passing it any exception details. In this case, the details of any current exception being handled will be used instead.
- Added a new mechanism for automatic discovery of third party instrumentation modules as an alternative to having to list them explicitly in the agent configuration file. Any such instrumentation module should register entry points under the 'newrelic.hooks' group in 'setup.py' for that package. The entries should be of the form 'target-module = instrumentation-module:function'. When the 'target-module' is imported, the function 'instrumentation-module:function' will be executed and passed the module. Any instrumentation module should then use functions provided by our agent API under 'newrelic.agent' to instrument the module as necessary.
Bug fixes/Improvements:
- When using the CherryPy web framework, the NotFound, InternalRedirect and HTTPRedirect exceptions if raised are now ignored and not treated as errors.
- When using the Pyramid web framework, if a view could not be found to handle a request, it could cause the agents' Pyramid instrumentation to fail, causing an exception.
- When using the Pyramid web framework, the PredicateMismatch exception if raised when trying to resolve a URL to a view handler is now ignored and not treated as an error.
- Updated the instrumentation for the pywapi module to drop support for the now discontinued Google weather API.
- Overhauled the mechanisms used to wrap instrumentation around functions to be monitored. When the agent is installed, if the optional C extension module can be compiled and installed, then the new wrappers should have a reduced overhead compared to the pure Python versions of the wrappers otherwise used.
- Running thread profiles on coroutine (gevent/eventlet) based systems no longer cause a timeout in the UI. Although the UI now no longer times out, as explained in our status of the Python agent documentation, we still however do not generate any results when running thread profiling on coroutine based systems.
중요
The end-of-life date for this agent version is July 29, 2019. To update to the latest agent version, see Update the agent. For more information, see End-of-life policy.
Notes
This release of the Python agent is a major new version and primarily focuses on the addition of support for Python 3.
The agent can be installed using easy_install/pip/distribute via the Python Package Index or can be downloaded directory from our download site.
For a list of known issues with the Python agent see our online help article on the status of the Python agent.
New Features:
- Python 3.3 or later is now supported. This includes support for popular web frameworks that have been ported to Python 3, such as CherryPy, Django, Flask, Pyramid and Tornado.
- Added new instrumentation to track as external service calls, requests made by the 'thrift' client module.
- Added new instrumentation to track memcache calls made by the 'bmemcached' client module.
Features Removed:
- Python 2.5 is no longer supported. The minimum required Python version is now 2.6. If using Python 2.5, you should ensure that any requirement for the 'newrelic' module listed in a 'setup.py' or pip requirements file says 'newrelic<2.0.0.0'.
Bug fixes/Improvements:
- Fixed broken instrumentation for 'httplib' module, which would cause an exception where the 'httplib' connect() method was being invoked via the Connection class type rather than an instance of the Connection class.
- Fixed issue where if the host system clock was wound backwards, then the response time of active requests could be set as being zero, resulting in a ZeroDivisionError when calculating thread utilization.
- Fixed issue where the use of SSL via a HTTP proxy by the agent to connect to the New Relic data collector to report data would fail.
- Fixed broken instrumentation for sqlite database client module which resulted in the executescript() API call failing.
- Add workaround for uWSGI issue where when using gevent mode of uWSGI, it would attempt to wait on all greenlets on process shutdown, instead of only on non daemon threads, specifically the request threads. The issue was causing processes to hang for 60 seconds on shutdown before the uWSGI master process killed the process. We are in discussion with uWSGI authors about a permanent fix to uWSGI.
중요
The end-of-life date for this agent version is July 29, 2019. To update to the latest agent version, see Update the agent. For more information, see End-of-life policy.
Notes
This release of the Python agent includes a hot fix to address an issue whereby external web service calls made via HTTPS connections were failing. This issue was introduced with version 1.13.0.30 of the agent.
The agent can be installed using easy_install/pip/distribute via the Python Package Index or can be downloaded directory from our download site.
For a list of known issues with the Python agent see our online help article on the status of the Python agent.
Bug fixes/Improvements:
- The Cross Application Tracing feature added in version 1.13.0.30 of the agent was causing failure of external web service calls made over HTTPS connections when that call was made via the 'httplib' module. As the 'httplib' module is used internally in other HTTP client libraries such as the 'urllib', 'urllib2', 'urllib3' and 'requests' modules, they would also have been affected.
- Setting the 'cross_application_tracer.enabled' setting in the agent configuration file to 'false' to disable Cross Application Tracing would cause an exception when an external web service call was being made via the 'httplib' module.
중요
The end-of-life date for this agent version is July 29, 2019. To update to the latest agent version, see Update the agent. For more information, see End-of-life policy.
Notes
This release of the Python agent adds support for Cross Application Tracing.
The agent can be installed using easy_install/pip/distribute via the Python Package Index or can be downloaded directory from our download site.
For a list of known issues with the Python agent see our online help article on the status of the Python agent.
New features:
- Support for New Relic's Cross Application Tracing feature is now available for the Python agent. This feature enables correlation of transaction traces between different services in your stack. It works on external calls made between applications monitored by any New Relic agents (Java, .NET, Ruby and Python), which support this feature. At this time the Python agent supports this feature on outgoing calls when using the 'httplib' module or any other module which uses 'httplib', such as the 'urllib', 'urllib2', 'urllib3' and 'requests' modules. Any inbound calls from other agents which support the feature will also be handled.
- Added instrumentation for the weberror package. This provides visibility into potentially blocking operations such as sending of email for exceptions which are being reported.
- Added instrumentation for the umemcache package.
- Added instrumentation for the DBAPI2 compliant interface for the IBM DB2 ibm_db_dbi database client package.
Bug fixes/Improvements:
- When running a WSGI application under the Tornado WSGI container, data reporting would stop if an unhandled exception managed to propagate back up to the Tornado WSGI container. This was due to a bug in Tornado in respect of its compliance with the WSGI specification. A workaround is provided to avoid the problems this caused to the Python agent. Tornado versions prior to 3.2 will still carry that bug however and we make no attempt to address the bug in Tornado.
- The Tornado instrumentation was causing template rendering to fail where a relative path was used to refer to the template and no template path had been specified for the RequestHandler instance or globally.
- The Tornado instrumentation was causing exceptions when using the @tornado.gen decorators under Tornado 2.X.
- When using Django, web transactions will now be named after individual view handlers when using class based views, rather than being named after the class itself.
- When using Pyramid, web transactions will now be named after individual view handlers when using view classes, rather than being named after the class itself.
- Celery instrumentation had stopped working correctly for Celery versions 2.5.3 through 2.5.5.
- No data was being reported where a monitored process was being shutdown within a couple of seconds of being started even if the agent was able to register. This could result in custom metrics in particular not being reported.
- SSL certificate validation was failing on older Debian systems due to the OpenSSL libraries not being able to process a couple of the certificates bundled with the Python agent. Those certificates were not required and have been removed.
- Calculation of a time string was failing on Windows due to using a strftime() formatter which only existed on UNIX systems.
중요
The end-of-life date for this agent version is July 29, 2019. To update to the latest agent version, see Update the agent. For more information, see End-of-life policy.
Notes
This release of the Python agent removes the experimental label from our Tornado Web and Pyramid support, with support now being enabled by default.
The agent can be installed using easy_install/pip/distribute via the Python Package Index or can be downloaded directory from our download site.
For a list of known issues with the Python agent, see Status of the Python agent.
New features:
- The previously experimental support for the native Tornado Web API has been greatly expanded and is now enabled by default. This is in addition to the tornado.wsgi.WSGIContainer support we previously provided and includes the native Tornado Web API for constructing async applications. Running a limited subset of the native Tornado Web API within a separate WSGI server using the tornado.wsgi.WSGIApplication adapter is also now supported.
- The previously experimental support for the Pyramid web framework has been improved and is now enabled by default.
- When using a DBAPI2 compliant database client, calls to stored procedures via the callproc() method of the database cursor are now tracked. Previously, only calls made to stored procedures by explicitly using a CALL SQL statement were being tracked. All calls to stored procedures currently appear under the category of 'SQL - Other'. A future agent update is planned which will split out calls to stored procedures separately and report them on the databases tab.
- Added instrumentation for automatically wrapping the WSGI application when using the CherryPy WSGI server bundled with the CherryPy framework.
- Added instrumentation for automatically wrapping the WSGI application when using the WSGI server from the Python standard library wsgiref module. Be aware that due to non conformance with the WSGI specification, it is not recommended that the WSGI server from the wsgiref module be used unless using Python 2.7.4 or higher. Issues with older versions of the WSGI server in the wsgiref module will cause incorrect reporting of data. More details are provided in our status of the Python agent.
Bug fixes/Improvements:
- External web calls made using the 'requests' module from a session were not being correctly monitored, resulting in such requests being picked up as being performed by the lower level 'httplib' module and the time taken not being inclusive of the whole request.
- The collection of explain plans by the agent in a background thread when performing a data harvest, was not explicitly performing a rollback. This could result in database proxies such as pgbouncer believing the database connection was now dirty and force closing the connection and ejecting it from the current database connection pool.
- The wrapper used by the agent around wsgi.input passed in the WSGI request environment was preventing non standard WSGI applications directly reaching down to the original socket connection so as to implement extensions such as websockets.
- The object wrapper used in our instrumentation for function traces has been improved so that it will pass type checks performed using builtin Python calls such as isinstance(), isfunction() and isclass(). This addresses issues where the object wrappers could interfere with the correct operation of web frameworks which derived the calling convention to be used when invoking a handler function from the type of the handler. Note that using type() on the wrapper object will still yield its true type, so functions such as isinstance() should always be used where possible.
- The agent could fail on startup when running on a system with a non English locale using a custom date/time format.
중요
The end-of-life date for this agent version is July 29, 2019. To update to the latest agent version, see Update the agent. For more information, see End-of-life policy.
Notes
This release of the Python agent introduces a major new feature called X-Ray Sessions. This feature allows you to gain deeper insights into a key transaction's performance by showing transaction traces alongside long-running profiler results.
For a list of known issues with the Python agent see our online help article on the status of the Python agent.
New features:
- X-Ray Sessions provide more targeted transaction trace samples and thread profiling for web transactions. For full details see our X-Ray sessions documentation.
- For new agent installations, the agent will now default to using a SSL connection when connecting to our data collector to report any data. If updating from an older agent version, you will however need to manually update your agent configuration file and change the 'ssl' setting to 'true' to always use SSL connections.
- When connecting direct to our data collector over a SSL connection, SSL certificate validation will now be performed to mitigate the possibility of man in the middle attacks.
- Breakdown metrics for transactions are now recorded as unscoped metrics as well as the existing metrics scoped to a web transaction. As custom dashboards can only chart unscoped metrics, what this means is that it is now possible to create custom dashboards that display data on specific breakdown metrics, such as time spent in traced functions. For example, you may wish to chart time spent in creating database connections, or specific middleware and view handler functions.
- When displaying error details, the full path of the exception is now displayed and not just the class name. This makes it easier to correctly identify the full name, with that name then being able to be directly copied into the 'error_collector.ignore_errors' setting of the agent configuration file if it is desired that that exception be ignored.
- Added the 'newrelic.agent.record_custom_metrics()' function to the public API for the agent to allow the recording of many custom metrics in one function call to the agent.
XXXFeatures Changed:
- We have temporarily disabled the generation of CPU burn information for transaction traces. This was displaying inaccurate values after a UI change, but also had an underlying issue whereby it was reporting CPU burn by the whole process and not just the thread handling the request. We are withdrawing the feature until we can improve the accuracy of the reported value.
- We have disabled the ability to get thread profiling information when a WSGI server makes use of coroutine libraries such as gevent or eventlet. This is because the nature of how coroutines are implemented, means we were are not able to generate accurate usable data.
Bug fixes/Improvements:
- When queueing Celery tasks from a web application, those web transactions were in some cases being wrongly categorised as background tasks. The name of the transaction was also being labelled with a string with the object representation, resulting in metric grouping issues.
- The older version of the 'requests' package we were bundling and were using for any HTTP calls was not closing socket descriptors immediately when a requests session object was disposed of. This could result in a small number of open socket descriptors being held open until the Python garbage collector kicked in and closed them.
- Login credentials supplied as part of a URL, could in some circumstances appear with the URL parameter associated with a web external node in a transaction trace sample.
- Django 1.5 moved which module the 'Http404' exception was declared in. As a result we were no longer correctly ignoring it when catching exceptions to process as errors.
- A check designed to warn against the use of uWSGI versions prior to 1.2.6, which contain a bug which results in the agent recording incorrect response times, was failing on very old uWSGI versions.
- Updated our gevent instrumentation to accommodate a prototype change in gevent 1.0rc1.
- Updated our bottle instrumentation to handle the non numeric version string used in bottle development versions.
- After five minutes of being unable to connect to our data collector to report data, the agent will now internally reset itself, discarding accumulated metric data and require the agent to reregister itself with our core application before collecting data once again. This is to ensure that we do not unnecessarily keep accruing data and causing an increase in memory usage while we cannot contact our data collector.
- Avoid the potential for a web request to deadlock in a situation where a web framework transaction management system made a copy of the object we use to record details about web transactions or background tasks.
중요
The end-of-life date for this agent version is July 29, 2019. To update to the latest agent version, see Update the agent. For more information, see End-of-life policy.
Notes
This release of the Python agent fixes an issue when floating point values were used in headers used to calculate queueing time.
For a list of known issues with the Python agent see our online help article on the status of the Python agent.
Bug fixes/Improvements:
- When a float value was provided in the X-Request-Start or X-Queue-Start headers as the time stamp, it was not being parsed correctly and the fractional part was being discarded. This was resulting in loss off accuracy.
중요
The end-of-life date for this agent version is July 29, 2019. To update to the latest agent version, see Update the agent. For more information, see End-of-life policy.
Notes
This release of the Python agent contains improvements in the way that queueing time is calculated.
For a list of known issues with the Python agent see our online help article on the status of the Python agent.
Bug fixes/Improvements:
- Resolved some issues with tracking of front-end queue time, particularly when the agent is running on an app hosted on Heroku. The agent will now more reliably parse the headers described in https://newrelic.com/docs/features/tracking-front-end-time and will automatically detect whether the times provided are in seconds, milliseconds or microseconds.
중요
The end-of-life date for this agent version is July 29, 2019. To update to the latest agent version, see Update the agent. For more information, see End-of-life policy.
Notes
This release of the Python agent contains a fix for when reporting to multiple applications, as well as other minor bug fixes and enhancements.
For a list of known issues with the Python agent see our online help article on the status of the Python agent.
New features:
- On the Linux platform, the agent environment now reports the total amount of system memory available.
- Added support for psycopg2cffi database module.
- Custom parameters can be associated with function trace nodes for display against transaction traces in the UI.
- The URL associated with a call to an external service will now be shown in the custom parameters section for the node in a transaction trace. Previously would have been shown as a label when hovering other the node.
Bug fixes/Improvements:
- The agent was not reporting any data where multiple applications were being listed in in the app_name configuration setting.
- Calling register_application() in the context of a module import could cause a temporary deadlock when a timeout period was specified. The potential for deadlock will now be detected and the function will return without waiting.
- When the agent was configured to capture query string parameters, a key with an empty value was being discarded and not reported.
- When using gevent mode of gunicorn, the SystemExit exception was being logged on process shutdown due to gevent sending the SystemExit exception to all greenlets and not just the main thread when sys.exit() was called.
- Instrumentation wrapping the Django reverse() function was not accepting named parameters.
- If custom parameters were used with a transaction, the HTTP response STATUS was duplicated in details related to an error raised from that transaction.
- Changes to Django instrumentation to avoid metric grouping issues resulting from raw URLs leaking through as transaction name.