Python Release Notes

Python Agent Release Notes

Monday, February 3, 2014 - 02:12
End of Life

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 improved instrumentation for the Bottle framework and new instrumentation support for gevent WSGI servers. It also allows reporting of data to multiple applications in New Relic to be specified via an environment variable, in addition to the existing 'app_name' setting in the agent configuration file.

The agent can be installed using easy_install/pip/distribute via the Python Package Index or can be downloaded directly 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:

  • Provide automatic instrumentation of the WSGI application entry point when using the 'gevent.wsgi' and 'gevent.pywsgi' servers. This means that if you are not using a web framework we already support and instrument, are using a WSGI component library, or implementing your WSGI application from scratch, it is no longer necessary to wrap the WSGI application entry point with our special decorator or wrappers when using the gevent WSGI servers.

Features Changed:

  • Previously it was only possible to list multiple applications in New Relic to report data to via the 'app_name' setting in the agent configuration file. Attempting to list multiple application names (separated by the requisite semi colon), in the 'NEW_RELIC_APP_NAME' environment variable was ignored with the complete value (including semi colons), being used as the application name. This limitation has now been lifted and a list of applications to report to can now be specified using the 'NEW_RELIC_APP_NAME' environment variable.

Bug fixes/Improvements:

  • The instrumentation for the Bottle web framework has been improved. The changes include the request handler now being broken out properly as a separate item in the transaction breakdown, the web transaction being named after an error handler when appropriate and requests which could not be mapped to a request handler being named as being a 404 if no error handler was provided. Handling of exceptions for HTTP errors has also been improved and are now being correctly matched against our internal list of HTTP status codes to be ignored as exceptions. Previously the instrumentation was too liberally ignoring all HTTP error exceptions.

  • When using the Flask web framework, a NotFound exception raised within the underlying Werkzeug library was not being ignored. It is now no longer necessary to explicitly ignore the exception type 'werkzeug.exceptions:NotFound' in the agent configuration.

  • When an unhanded exception was raised by a Pylons application, a bug in the implementation of the agent's error trace wrappers would cause a subsequent exception to be raised from the agent itself, masking the details of the original exception.

  • When trying to determine how much memory was available on a system, the agent would fallback to trying to the use the 'psutil' module, if installed, if our standard ways of checking failed. This would cause the agent to fail on a PaaS such as PythonAnyWhere, which prohibits access to the /proc filesystem. Use of 'psutil' as a fallback has now been removed to avoid any potential for a failure.

  • The version of the bundled 'requests' module the agent used to perform HTTP requests to our data collector did not work with Python 2.6.2 or older. A fix to 'urllib3' used by the 'requests' module has been back ported to address the issue.

  • Our updated database instrumentation wrappers released in the last agent version, would incorrectly return that a database connection or cursor object were callable. This could confuse code which was trying to introspect those objects to perform traversal in order to get access to inner details of the implementation of the database modules.

Friday, January 24, 2014 - 01:45
End of Life

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 an issue related to cross process application traces introduced in 2.10.0.8.

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 value of headers inserted into the HTTP response returned from the WSGI application to support cross process application tracing were being incorrectly passed as Unicode strings on Python 2. This would cause a strictly compliant WSGI server such as Apache/mod_wsgi or uWSGI to raise an error when the headers were being set. In general, pure Python WSGI servers are not as strict in their WSGI compliance and would have silently accepted the value anyway, converting it to a byte string using the Python system default encoding.
Friday, January 17, 2014 - 10:40
End of Life

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 various improvements and bug fixes related to instrumentation for database client modules, as well as a notable fix to our 'newrelic-admin' script affecting some users who referenced Python virtual environments via a symbolic link.

The agent can be installed using easy_install/pip/distribute via the Python Package Index or can be downloaded directly 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:

  • Instrumentation of the WSGI application entry point will now add a new breakdown metric to web transactions corresponding to the finalization of the WSGI request. Within the workings of the interaction between the WSGI server and the WSGI application, this is the point at which the WSGI server will call any close() method on the iterable returned by the WSGI application. The name of this new breakdown metric is 'WSGI/Finalize'. In the case where there was actually a 'close()' method, a further breakdown metric will also appear corresponding to that method.

  • Added support to instrumentation for MySQL and PostgreSQL database client modules for monitoring database queries when the database connection object is used as a context manager. Such context manager features are outside of the scope of the Python DBAPI2 (PEP 249) specification, not all database client modules support it and nor do they all work the same. Although supported, we would suggest consideration should be given to not using these context manager features if you need your code to be portable between databases.

  • Added support to instrumentation for MySQL database client modules for monitoring database queries when the database connection object was created using the Connect() function. The Connect() function falls outside of the scope of the Python DBAPI2 (PEP 249) specification. Although supported, we would suggest consideration should be given to not using this Connect() function if you need your code to be portable between databases.

  • Added database instrumentation support for the mysql-connector-python database client module.

  • Custom parameters for a transaction which are a string or numeric value will now be added to and reported with analytic events reported to our analytics system code named Rubicon. This can be disabled using the agent configuration setting 'analytics_events.capture_attributes'.

  • The capture of custom parameters against a transaction trace can now be disabled using the agent configuration setting 'transaction_tracer.capture_attributes'.

  • The capture of custom parameters against error details can now be disabled using the agent configuration setting 'error_collector.capture_attributes'.

Features Changed:

  • The agent API function add_user_attribute() is now deprecated and functionality merged with the add_custom_parameter() function. The latter function should now be used instead. The display of such parameters in browser traces is now optionally enabled with the agent configuration setting 'browser_monitoring.capture_attributes'.

Bug fixes/Improvements:

  • If the 'newrelic' package was installed into a Python virtual environment, but the 'newrelic-admin' script was executed via a path that traversed a symlink to the virtual environment, the protections within the agent bootstrapping procedure was detecting that the agent was trying to be used with an application running against a different virtual environment when it was actually the same. This would result in the application not being monitored. This issue was introduced in version 2.8.0 of the agent when additional protections were added against mixing application/modules from different Python virtual environments.

  • Explain plans were not being performed on SQL queries made via the executemany() method of a database cursor object. When explain plans are now done, the data inputs from the first row of input data for the executemany() call will be used.

  • When using Python 2, if strings were supplied for the web transaction name, custom parameters, in error details etc, and that string contained a series of characters which could not be decoded as valid UTF-8, then an exception would occur. In the case of a web transaction name, this could result in the exception affecting the current web transaction and result in an error response being sent back to a user. For the case of a transaction trace or error details, the exception would prevent the sending of the captured data up to our data collector and it would be discarded. This was a regression within the agent behaviour introduced when Python 3 support was added to the agent.

  • Fixed instrumentation for sqlite database modules which could result in instrumentation not being applied correctly, and so no database metrics collected, if the sqlite module had been imported prior to the agent being initialized.

  • Limits being applied to the length of the SQL for a slow SQL query when being sent up to our data collector were being applied at the wrong time, resulting in the truncated SQL being used when performing an explain plan. This didn't affect the operation of the web application, but database logs could contain an error about the malformed SQL query.

  • Explain plans could be attempted for an SQL query even where the SQL query failed. Under most circumstances a SQL query would fail immediately and so the duration would fall below the threshold for collecting an explain plan, but the changes now made will protect against a long running SQL query which failed in the database and ensure that no additional problem is caused by issuing an explain plan for it.

  • If a monitored web application is started up using our newrelic-admin wrapper script, and it executes a separate Python script and that Python script used a Python version older than Python 2.6, the script could output the error message "'import site' failed; use -v for traceback". The execution of the script was not affected, but the message obviously could cause concern.

  • The equivalent functions from the 'urllib2' module from Python 2 were not being instrumented when Python 3 was being used. This was missed when Python 3 support was added to the agent.

Friday, December 13, 2013 - 13:13
End of Life

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 marks the official introduction of support for pypy. Instrumentation has also been updated to address issues arising from the release of Celery 3.1.

The agent can be installed using easy_install/pip/distribute via the Python Package Index or can be downloaded directly 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:

  • The agent has worked with and has already been used by customers with pypy for some time, but we have not officially acknowledged that we support pypy. We have now integrated pypy into our test procedures and now officially support this implementation of the Python language.

Bug fixes/Improvements:

  • Instrumentation for Celery has been updated to accommodate changes in Celery 3.1. The changes in Celery 3.1 resulted in no metrics being reported in prior versions of the agent.

  • When collecting data on external web service calls, the agent now drops port 80/443 from the name of the host when used with the standard http/https protocol schemes. This ensures that a URL with or without the ports are seen as the same service in the external web services page in the UI.

  • When using newrelic.agent.initialize() explicitly, if no arguments are provided, the values for the config file and environment arguments will now be read from the NEW_RELIC_CONFIG_FILE and NEW_RELIC_ENVIRONMENT arguments if specified.

  • Flask instrumentation was not correctly mapping URLs related to a HTTP 404 response to a known framework or application handler function. Instead the web transaction was named after the URL, which could result in metric grouping issues if an application was hit with a large number of URLs which couldn't be mapped by the application. Such requests will now be mapped to flask.app:Flask.handle_http_exception.

  • Pyramid instrumentation should no longer report as errors instances of exceptions derived from HTTPRedirection, raised to generate a HTTP redirect response.

  • Improvements to the newrelic-admin wrapper script and agent bootstrapping procedure to better deal with a local sitecustomize.py file. Changes will also better handle the case where the newrelic-admin wrapper script was used around a Python script using a different Python installation than that which the newrelic package was installed in, avoiding possible errors when the wrapped script was run, due to the mismatch.

Saturday, November 2, 2013 - 22:33
End of Life

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 support for web applications and worker processes using 'gearman' for background task execution. The agent also switches to using the 'json' package from the standard library instead of a separate 'simplejson' package. This should result in potential reductions in base level memory usage by the agent and a reduction of CPU overhead for some environments.

The agent can be installed using easy_install/pip/distribute via the Python Package Index or can be downloaded directly 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:

  • Instrumentation now provided for the gearman package. The support covers use of both the gearman client and worker interfaces. In the case of workers, each task executed by the worker will be recorded as a background task and be displayed as such in the New Relic UI.

  • The ignore_errors argument to newrelic.agent.record_exception() can now be a callable in addition to being able to pass a sequence. When it is a callable, the callback will be called with the three arguments exc, value and tb, being the same values as returned by sys.exc_info(). The callback should return True if the exception is to be ignored. False if the exception should never be ignored regardless of any other checks, and None if subsequent checks and inbuilt rules should determine if the exception should be ignored. A callback would normally return either True or None.

Bug fixes/Improvements:

  • The bundled 'simplejson' package has now been removed and is no longer used. This was previously used due to the requirement to support Python 2.5, for which support was removed in version 2.0.0 of the agent. Instead of simplejson, the 'json' package contained in the Python standard library is now used instead. This should see the base level memory usage of the agent drop as a result. Further, in environments where a C compiler was not available and the C extension modules could not be compiled, there should now be a minimal reduction in the CPU overhead when the agent is uploading data to our back end. This is because the optimised C extension in the json package will always be available as part of the Python standard library and will always be able to be used.

  • If a WSGI application was returning an iterable such as a generator, and an exception was raised when a specific part of the response content was yielded from the generator, the details of the exceptions were not being recorded.

  • In a multithreaded web application where deferred module imports were being performed in secondary threads, agent registration could fail the first time due to concurrent changes made by the secondary threads to sys.modules. Registration would succeed on a subsequent attempt. This bug was only occurring in Python 2 and was introduced in version 2.0.0 of the agent when Python 3 support was added.

  • Custom parameters which were explicitly supplied to newrelic.agent.record_exception() were being ignored and were not appearing in the error details page in the UI. Instead, only custom parameters added using newrelic.agent.add_custom_parameters() against the web transaction or background task itself were being shown. This bug was introduced in version 1.13.0 of the agent when support for cross application tracing was added.

  • The port number used in the URL for a web external call, was not being retained when the URL was added as a parameter against the web external node for transaction traces. The port would therefore not be displayed when drilling down into the details of a web external node in a transaction trace.

  • The newrelic-admin validate-config command will now work for enterprise high security mode accounts, provided of course that no setting is otherwise specified in the agent configuration file which is in conflict with that mode. That is, features such as SSL would still need to be enabled by the ssl setting and the capture_params setting indicating whether URL query string parameters should be captured, also set to false.

  • When using CherryPy, in addition to the explicit exception type 'NotFound' being ignored as an error, raising of a 'HTTPError' exception where the status is 404 will also be ignored. Similarly, instances of the 'HTTPError' exception will be ignored as an error when they are for a HTTP error in the 30X range.

Wednesday, October 16, 2013 - 05:04
End of Life

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 bug fix release primarily to address a number of issues introduced in version 2.2.0.2 which have effected a small number of users.

This version of the agent is also the minimum recommended agent version required to be able to see percentiles and histogram charts. All reporting hosts for an application must be upgraded to the minimum agent version for the feature to be visible.

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 issues with instrumentation wrappers which caused failure of WSGI application integration for FASTCGI/SCGI/AJP using flup.

  • Fixed issues with instrumentation wrappers which caused failure of wrappers for external web service calls in certain uses cases.

  • Fixes issues with instrumentation wrappers which caused failure when queuing Celery tasks from within a web application using django-celery.

  • When using the ErrorTrace context manager to capture details of exceptions within a certain context, None can now be passed for the transaction and an assertion failure will not be raised. This avoids the need to check explicitly to see if a web request is being monitored and avoid using ErrorTrace where there isn't.

Friday, October 11, 2013 - 22:13
End of Life

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.
Friday, October 11, 2013 - 02:22
End of Life

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 front-end 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.

Wednesday, September 4, 2013 - 03:33
End of Life

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.

Friday, July 5, 2013 - 13:30
End of Life

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.

Wednesday, July 3, 2013 - 03:30
End of Life

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.

Tuesday, May 28, 2013 - 07:00
End of Life

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.

Tuesday, April 9, 2013 - 18:00
End of Life

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.

Saturday, February 23, 2013 - 06:12
End of Life

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.
Friday, February 22, 2013 - 07:15
End of Life

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.
Wednesday, January 23, 2013 - 00:00
End of Life

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.

Wednesday, December 19, 2012 - 09:30
End of Life

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 addresses an issue with under reporting of memory use on Linux, 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:

  • Added support for automatically wrapping the WSGI application entry point when using the Paste HTTP server.

  • Custom metrics can now be reported via the public agent API by supplying an appropriate application object as an additional argument to 'newrelic.agent.record_custom_metric()'.

  • Added support for the 'psycopg2ct' database client module for PostgreSQL.

  • When needing to communicate via a firewall, the proxy settings can now be set via environment variables in addition to being able to be set in the agent configuration file.

  • The number of CPU cores is now being reported in the agent environment and displayed in the UI.

  • A warning will now be logged in the agent log file if an older version of uWSGI is being used which has bugs with its conformance to the WSGI specification. Such older uWSGI versions would see incorrect data being reported due to the bug in uWSGI.

  • A warning will now be logged in the agent log file if uWSGI is being used and the 'enable-threads' option is not being supplied to uWSGI to enable threading within the Python interpreter, a feature which is a mandatory requirement for the Python agent to be able to work.

  • A range of additional logging and debugging options have been added to allow our support team to better help you when you are having issues with setting up the agent.

Bug fixes/Improvements:

  • Addressed problem where memory usage was being under reported on Linux systems. The degree to which memory usage was under reported was dependent on the memory page size the system was using. If affected you can expect to see memory usage being reported jump up as it reports the correct value.

  • If the local Python installation is already using a 'sitecustomize.py' file, the agent's own 'sitecustomize.py' file will ensure that the existing copy is imported and code in it executed so that existing definitions are still applied.

  • Installation of the agent could fail under buildout due to a missing Python future import for the Python with statement under Python 2.5.

  • Made parsing of URLs more tolerant to malformed URLs in web external calls. The agent was encountering an error when the port number of a URL was not an integer, resulting in the data for that transaction being discarded.

  • Use of raw greenlets from within a transaction was failing causing an exception and the users web request to typically fail with a HTTP 500 error response.

  • Configuration of the agent will no longer fail on startup if there is no 'newrelic' section in the configuration file.

Wednesday, November 14, 2012 - 05:00
End of Life

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 enables the ability to set apdex values and alerts for key transactions (discussed here)

For a list of known issues with the Python agent see our online help article on the status of the Python agent.

New features:

  • Added support in the agent required to enable apdex values to be specified for key transactions.

  • Added support for tracking SQL database queries when using the 'oursql' database client module for MySQL.

Bug fixes/Improvements:

  • The sqlite3 instrumentation was preventing the use of a sqlite3 database connection object as a context manager together with the 'with' statement.

  • Suppressed the logging produced by the urllib3 module included within the bundled requests module, when making socket connections.

Wednesday, November 7, 2012 - 05:00
End of Life

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 focuses on providing a low-overhead thread profiler which can monitor and record executing threads for a specified time, without affecting the customer experience.

For a list of known issues with the Python agent see our online help article on the status of the Python agent.

New features:

  • Low-overhead thread profiler. A profiling session can be initiated for a period from 2 to 10 minutes. The profiler will periodically sample what all the executing threads are doing, aggregating the results together to get a statistical snapshot of where in your application most time is being spent.

Bug fixes/Improvements:

  • Importing of the greenlet module was resulting in the capacity analysis report metrics being disabled, even though it was meant to only be disabled when specifically using a coroutine based WSGI server such as gevent and eventlet mode of gunicorn.

  • Improvements to the instrumentation wrapper applied to the Django view handler function so that code which tries to compare the view handler to an expected value should work. Note that this is dependent upon using an equality test rather than an identity test.

  • Reverted prior change which stripped the instrumentation wrapper from the Django view handler when it was passed to any Django view middleware. Improvements to the instrumentation wrapper should remove the need to do this. Having the view handler passed in with the wrapper applied is required to ensure that calls to the view handler are tracked properly where the view handler is called from within the view middleware.

  • Although not strictly required due to improvements to the instrumentation wrapper applied to a Django view handler, strip the wrapper when a view handler is passed into django.core.urlresolvers.reverse() function to ensure it can correctly determine the URL mapping to the view handler.

  • Disable automatic RUM header/footer insertion when using Django 1.5 and the new streaming HTTP response object is returned. This is being disabled so that the response is not buffered, thereby interfering with the streaming process. If streaming a HTML response and RUM reporting is still required, the RUM header and footer will need to be added manually.

  • Instrumentation of the feedparser module was causing an exception when a file like object rather than a string was passed to the feedparser.parse() function.

  • Tastypie instrumentation was failing to be applied if using Python 2.5.

Tuesday, October 16, 2012 - 10:00
End of Life

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 minor feature and bug fix release.

For a list of known issues with the Python agent see our online help article on the status of the Python agent.

New features:

  • When reporting web application performance data against multiple applications in the New Relic UI at the same time, any end user metric data will now also be reported against all applications. Previously end user metric data would only be reported against the first application.

  • The environment variable 'NEW_RELIC_SSL' can now be set to enable use of a SSL connection when reporting data to our data collector. Enabling values are 'true', 'on' or '1'. This can be used on platforms such as Heroku where configuration is performed using environment variables instead of an agent configuration file.

  • Added instrumentation for tracking database queries when using the 'pymysql' module for the MySQL database.

Bug fixes/Improvements:

  • Fix to algorithm calculating name of function for case where function was wrapped with a decorator implemented using a class. Previously was using the name of the decorator class rather than the name of the wrapped function.

  • Fix for ZeroDivision error when calculating per request CPU burn, where due to clock granularity for system the request was quick enough to effectively have zero duration.

  • Fix for AttributeError when trying to process None as a slow transaction trace when in a harvest period there were browser traces but no application server traces.

Pages