Notes
중요
This release has been superseded. Please use version 2.86.2.68 or higher.
This release of the Python agent includes various bug fixes as described below.
The agent can be installed using easy_install/pip/distribute via the Python Package Index or can be downloaded directly from the New Relic download site.
Bug Fixes
Handle exceptions generated by Tornado 4 AsyncHTTPClient during fetch
Exceptions generated by a call to the Tornado 4 AsyncHTTPClient resulted in an agent instrumentation error. Exceptions generated by AsyncHTTPClient are now recorded and properly handled.
Using gevent/eventlet on Python 3.6 resulted in a RecursionError
Python 3.6 introduced a change to the ssl library. This change can result in a recursion error when the New Relic agent imports ssl prior to eventlet/gevent patching the ssl library (as is the case with use of the newrelic-admin script). This recursion error has been mitigated when using newrelic-admin to start applications.
Notes
This release of the Python agent includes improvements to our introductory support for Tornado 4 applications as well as bug fixes.
The agent can be installed using easy_install/pip/distribute via the Python Package Index or can be downloaded directly from the New Relic download site.
New Feature
Tornado 4 Outbound Cross Application Tracing
Tornado 4 Cross Application Tracing is now supported for outbound web transactions. In addition to Service Maps, Tornado 4 transaction traces will now contain links to the application it called. With this update, Cross Application Tracing is now fully supported for Tornado 4 applications.
Bug Fixes
Django 1.10+ browser monitoring with new-style gzip middleware
Browser monitoring was not automatically inserted when using new style Django 1.10+ gzip middleware. Browser monitoring code is now inserted as expected.
Using motor versions 1.X generated instrumentation errors
Motor 1.0 removed the MotorReplicaSetClient class which resulted in the New Relic Python Agent generating an instrumentation error when attempting to access that class. The instrumentation has been fixed.
Notes
This release of the Python agent includes bug fixes and improvements to the precision of the duration data recorded for transaction traces.
The agent can be installed using easy_install/pip/distribute via the Python Package Index or can be downloaded directly from the New Relic download site.
Improved Feature
Transaction trace precision
This release improves the precision of transaction traces. Duration of functions in a transaction trace are now recorded at sub-millisecond precision.
Bug Fixes
Custom classmethod traces may incorrectly return the parent class
Wrapping classmethods in classes that are subclassed could cause the subclassed classmethod to be improperly bound to the parent class. This would result in the classmethod returning an instance of the parent class when the method was called on a child class.
Handle incomplete Tornado coroutine traces
Tracing a Tornado coroutine that never completed and was later garbage collected, could result in an application hang. This has been fixed.
Notes
This release of the Python agent includes a bug fix for our introductory support for Tornado 4 applications.
The agent can be installed using easy_install/pip/distribute via the Python Package Index or can be downloaded directly from the New Relic download site.
Bug Fixes
Ending Tornado 4 transactions inside of a traced function results in an internal agent error
Ending a Tornado 4 web transaction within a traced function previously resulted in the generation of an agent traceback. The agent now completes tracing the function before ending the transaction, resulting in the correct reporting of these transactions to New Relic.
Notes
This release of the Python agent improves our introductory support for Tornado 4 applications by adding Cross Application Tracing for web transactions that are sent to a Tornado 4 application.
The agent can be installed using easy_install/pip/distribute via the Python Package Index or can be downloaded directly from the New Relic download site.
New Feature
Tornado 4 applications will now appear in Service Maps
Tornado 4 Cross Application Tracing is now supported for inbound web transactions. In addition to Service Maps, the calling application's APM will now have links to the Tornado 4 application it called in the External Services tab and in Transaction Traces.
Bug Fixes
Record exceptions outside of view handlers in Django 1.10
Unhandled exceptions that occurred outside of a view handler in Django 1.10 were not reported. In addition to middleware exceptions, these unhandled exceptions can be generated when a view handler returns a TemplateResponse and rendering that template would result in an exception.
Consistent WSGI/Application and WSGI/Response segments
Prior to this release, the agent would group segments under
WSGI/Application
andWSGI/Response
differently, depending on whether or not browser monitoring was enabled. This has now been made consistent.Improved New Relic WSGI middleware behavior
The New Relic agent is now resilient when called by non-conforming middleware. Transactions will continue to be reported normally when the New Relic agent is called by WSGI middleware that does not call the close() method as described in the PEP 333 specification.
Notes
This release of the Python agent is a hotfix release to address a problem with the Tornado 4 instrumentation for curl_httpclient
introduced in our last release (v2.80.0.60). Under the circumstances described below, calling CurlAsyncHTTPClient.fetch_impl()
could result in an agent error.
The agent can be installed using easy_install/pip/distribute via the Python Package Index or can be downloaded directly from our download site.
Bug Fix
Fix CurlAsyncHTTPClient.fetch_impl() instrumentation
If
fetch_impl()
was called by passing therequest
argument positionally, but passingcallback
as a keyword argument, then the agent would throw an error. In practice, this only affected customers who implemented a custom version offetch_impl()
, but for those affected customers, this is now fixed.
Notes
This release of the Python agent enhances our introductory support for Tornado 4, most notably by adding support for tornado.curl_httpclient
.
The agent can be installed using easy_install/pip/distribute via the Python Package Index or can be downloaded directly from the New Relic download site.
New Features
Tornado 4 curl_httpclient support
Previously, the agent's Tornado 4 instrumentation only supported the default
tornado.simple_httpclient
. With this release, support has been added fortornado.curl_httpclient
as well.Tornado 4 ZeroMQ IOLoop support
Using
ZMQIOLoop
in place of the default TornadoIOLoop
is now supported for Tornado 4 applications.
Improved Feature
Improved transaction names for Django REST Framework
When using the Python agent with Django REST Framework and Python 3, function-based views wrapped with the
rest_framework.decorators.api_view
decorator would result in transactions with names based on the decorator (WrappedAPIView.handler
) rather than names based on the original view function. (This did not affect applications running with Python 2.)With this release, the transaction names for these wrapped views are now based on the name of the original view function in both Python 2 and Python 3.
Bug Fix
End transactions correctly with Tornado 4 @asynchronous decorator
When the agent records a transaction for a Tornado 4
RequestHandler
method that is decorated with the@tornado.web.asynchronous
decorator, the transaction should remain open untilRequestHandler.finish()
is called. Prior to this release, there were some circumstances where the agent closed the transaction prematurely, resulting in transaction durations that were too short. This has now been fixed.
Notes
This release of the Python agent adds support for reporting datastore instance information for the elasticsearch library.
Over the past few releases, support has been added to the agent for collecting datastore instance information for a number of drivers. See a complete list of supported packages.
The agent can be installed using easy_install/pip/distribute via the Python Package Index or can be downloaded directly from the New Relic download site.
New Feature
Datastore instance information for elasticsearch
For operations made using the official Elasticsearch client, the Python agent will collect the host and port of the elasticsearch server. This data will be displayed in transaction traces and in slow query traces in APM.
Bug Fix
Cornice 2.3.0 TypeError
When using the latest version of Cornice,the Python agent would raise a
TypeError
exception due to not handling the changed signature ofcornice.Service.decorate_view()
. Earlier versions of Cornice were not affected, and with this release, the Python agent no longer raises an error for version 2.3.0.
Notes
This release of the Python agent adds support for reporting datastore instance information for the python-memcached library. It also addresses a couple of Python 3 issues related to naming metrics and transactions.
Over the past few releases, support has been added to the agent for collecting datastore instance information for a number of drivers. See a complete list of supported packages.
The agent can be installed using easy_install/pip/distribute via the Python Package Index or can be downloaded directly from the New Relic download site.
New Features
Datastore instance information for python-memcached
For most memcached operations made using the python-memcached package, the Python agent will collect the host and port of the memcached server, as well as the memcached database index number. This data will be displayed in transaction traces and in slow query traces in APM.
Supported operations include:
add
,append
,cas
,decr
,delete
,get
,gets
,incr
,prepend
,replace
,set
.Currently, the Python agent does not collect instance information for operations that interact with multiple memcached instances. These include:
delete_multi
,flush_all
,get_multi
,get_slabs
,get_stats
,set_multi
.
Bug Fixes
Names for subclass methods in Python 3
Previously, when using Python 3, if a method was defined on a base class, but was called as a method on an instance of a subclass, the agent would generate a metric name or transaction name for that method using the base class. It would also use the module name of the base class in the metric or transaction name.
With this release, the metric name or transaction name will use the class name of the subclass, as well as the module name of the subclass. This is consistent with how the naming works for Python 2.
Names for Flask pluggable views in Python 3
When monitoring Python 3 Flask applications, the agent would create metric and transaction names for Flask pluggable (or, class-based) views using the name of the
View.as_view()
classmethod, making it impossible to distinguish between different views in APM. Now, the metric and transaction name uses the name that is passed intoView.as_view()
.For example, a view defined as
view_func=ShowUsersView.as_view('show_users')
would useshow_users
as the view name. This is consistent with how the naming works for Python 2.Redis client with custom connection pool
If a custom connection pool was used with the redis client, the agent could throw an
AttributeError
when attempting to gather datastore instance information. One library known to define a custom connection pool that encountered this issue is Redis Blaster. With this release, the agent will no longer throw an error for custom connection pools. In addition, the agent will now be able to gather datastore instance information for some operations, even when using a custom connection pool.Developer Mode error message during "fake" harvest
When using the configuration setting of
developer_mode = True
, the agent does not transmit any data to New Relic. Instead, it performs a "fake harvest". In some cases, it was possible for the agent to log anAssertionError
during the "fake harvest", but this issue has now been fixed.