Python release notes

Python agent release notes

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.

Tuesday, September 4, 2012 - 03:50
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 capacity analysis reporting, an improved sampling algorithm to ensure a wider sampling of slow transactions and added support for TastyPie, dropbox and facepy modules.

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

New features:

  • Enable capacity analysis reporting where web application is single threaded or multithreaded (but not coroutine based system such as gevent and eventlet). This report helps you determine if you have enough instances deployed to keep up with request load and so tune your configuration for optimal performance.

  • Criteria by which slow transaction samples are captured has been changed so as to include slow transactions for a broader range of transactions. Previously the transaction with the slowest overall response time would always be captured and reported. Whether a specific transaction will be preserved as a sample of a slow transaction will now also depend on whether a recent slow transaction had already been captured for it and give preference to recording slow transactions for a different transaction, rather than the same transaction all the time, if it is always the slowest.

  • Where TastyPie is being used with Django, instead of all web transactions being handled by TastyPie being labeled against the TastyPie wrapper, the web transactions will now be aggregated against the specific methods of the resource or API object handling the request.

  • Added instrumentation for the 'dropbox' Python module to track time spent calling out to the DropBox web service. A call to this web service would have been tracked previously by virtue of the 'dropbox' module internally using the 'httplib' module. This added instrumentation however makes the data collected more accurate as will properly track time spent sending the request and receiving the response. It will also attribute the call to the 'dropbox' module in transaction traces and performance breakdown data.

  • Added instrumentation for the 'facepy' Python module to track time spent calling out to the Facebook web service. A call to this web service would have been tracked previously by virtue of the 'facepy' module internally using the 'requests' module. This added instrumentation however allows the call to be attributed to the 'facepy' module in transaction traces and performance breakdown data.

  • Added support for gevent < 0.13.7 by way of patching an existing bug in gevent. The specific problem in gevent was patched in version 0.13.7 of that package. This change will allow older versions of gevent to also be used if there is a requirement.

Bug fixes/Improvements:

  • Instrumentation for Genshi templates was failing when the OR operator was used inside of a template.

  • If an exception occurred in the first call to read data from wsgi.input to get the request content, it would cause a subsequent exception when recording of response time was being finalised. This wasn't causing any impact on user requests, but would result in any metrics for that request being discarded and an error being logged in the agent log.

Wednesday, August 1, 2012 - 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 introduces a number of new features including improvements to RUM browser traces. Performance of the agent has also been improved though reducing some of the overheads when dealing with tracking SQL database queries.

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 now collects additional application tier transaction trace samples for slow transactions and will correlate them with any corresponding RUM browser trace.

  • Slow transaction traces will now show a figure corresponding to the amount of CPU burn that occurred during the period the transaction was running. This can be used to get an indication of whether code being executed was CPU intensive or principally waiting on I/O.

  • Slow transaction traces for web requests will now provide an indication of how many concurrent requests were executing at the same time in the process the request was being handled. This can be used to determine how busy the process was at that time, but would also be used in conjunction with the recorded CPU burn to determine whether CPU burn was all from the one transaction or could also be due to parallel executing web requests in a multithreaded application. Note that this measure is dependent on an optional C extension component of the agent being able to be installed at the time of installation of the agent.

  • Slow transaction traces for web requests will now display information about the amount of request content read and the amount of response content generated. This will include details about what methods of 'wsgi.input' were used to read content and how long it in total took to read the request content. Similar details are also provided about how response content was generated and how long it took from start to finish.

  • Slow transaction traces for web requests will now display the value of any front-end queueing time within the server stack which pertained to that specific request. Note that this is dependent on the server stack having being configured to introduce the required header to allow queueing time to be measured. The Python agent recognises the 'X-Queue-Start' header.

  • Automatic support is now provided for tracking front-end queueing time within the server stack when an application is deployed to Heroku.

  • An API call and means via the WSGI environ dictionary is now provided for indicating that a transaction should not be a candidate for slow transaction traces. This is to allow one to ignore transactions which are known to always be slow. The API call is 'newrelic.agent.suppress_transaction_trace()'.

  • Calls to Django APIs for sending emails will now be tracked in the performance breakdown for transactions, as well as being displayed in slow transaction traces.

  • Support for Celery 3.0.

Bug fixes/Improvements:

  • Overheads within the agent which could affect performance of the application have been reduced. The improvements specifically revolve around the processing of SQL database queries. This is principally to address larger than expected overheads seen by a very small subset of users which had large or more complicated SQL queries. The changes could though still result in a small general reduction in overhead and CPU usage directly attributable to the monitoring down by the agent when SQL database queries are being tracked.

  • Where it is possible to build C extension components at the time the agent is installed, optional C speedups for JSON will now be installed. This reduces the overhead of JSON encoding when data is being sent by the agent to the New Relic data collector on each one minute harvest cycle. If the C extension cannot be compiled, the agent will fall back to using pure Python code as it has done in prior versions of the agent.

  • Django instrumentation has been improved and issues addressed with the way that instrumentation wrappers were applied to view handlers. For example, when a view handler is passed to a view middleware, any instrumentation wrapper is now removed. This is because the wrapper could cause issues for some code which tried to do a direct comparison between the view handler passed and an expected value. It is believed this change will fix issues when using Mezzanine.

  • A sporadic issue with the data collector rejecting uploaded data due to what it believes was malformed JSON should be addressed. This was due to some metric values being aggregated as integers rather than as float values. This resulted in overflow of 64 bit values in the data collector due to Python supporting arbitrary length integers and thus being able to send values larger than 64 bits.

  • The agent will now no longer fail on import when -OO option is used with the Python interpreter to enable highest level of optimisation. This was an issue as -OO strips documentation strings from code and the agent was not handling the case that the documentation string would then be a None object.

Tuesday, June 12, 2012 - 02: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 has focused on improving the way the agent communicates with the New Relic core application. This includes improved logging and error handling, but also adds support for SSL and connecting via a proxy when the monitored host is located behind a firewall.

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

Changed features:

  • The request method for a call to an external web service, when able to be collected by instrumentation, is now shown against a web external node in a slow transaction trace where as previously it showed the path segment of the URL. The URL, minus embedded user/password and query string is instead now shown as a label when hovering over the web external node in the slow transaction trace details.

  • Improved logging and error handling when communicating with the New Relic core application. Many messages previously logged as errors will now be logged as warnings and an error only logged when a recurring problem is detected. This should reduce emails triggered from errors logged via the Python logging module to only those that may actually require action.

  • Significant error messages or warnings will be output to standard output when running the agent test via the 'newrelic-admin validate-config' command. This ensures that it will be easier to detect when the test has failed due to network connectivity or license key issues.

New features:

  • Connecting to the New Relic core application using a secure SSL connection is now supported. This is enabled by setting the 'ssl' setting in the agent configuration file to 'true'.

  • Connecting to the New Relic core application via a proxy is now supported. This is enabled by setting the 'proxy_host' and 'proxy_port' settings in the agent configuration file. If a secure SSL connection is desired, the 'ssl' setting can be set to 'true' at the same time. If the proxy requires a user name and password, the 'proxy_user' and 'proxy_pass' settings can be additionally set.

  • When sending collected data to the New Relic core application it will be compressed when over a certain size to cut down on the amount of data being sent.

  • The Python agent now includes its own self instrumentation and profiling capabilities to allow New Relic to monitor the performance of the agent itself and help debug any performance issues reported by a user which may occur in rare circumstances with certain web applications.

Bug fixes:

  • Where a user name and password were being included as part of a URL for a call to an external web service, eg., 'user:pass@localhost/', that the Python agent was instrumenting, the details were not always being scrubbed properly from details being reported to the New Relic core application.
Wednesday, April 25, 2012 - 09:41
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.

Bug fixes:

  • Fix assertion violations when greenlets were used explicitly in the context of a normal thread based request handler.

  • Installation of package using Python 2.5 was giving warnings when trying to byte code compile installed .py files due to missing import for 'with_statement' from __future__ module in some modules.

  • The newrelic-admin script is now installed correctly when installing the package as an egg under buildout.

  • The newrelic.agent.stop_recording() function was causing errors when using any WSGI hosting mechanism other than Apache/mod_wsgi and wasn't working as intended even under mod_wsgi.

  • Disable CPU sampling when os.times() is not available, such as when using Jython.

  • Derivation of name when instrumenting the __init__() method of a class could fail if the class had a __len__() method which accessed methods/attributes which were only setup during the constructor.

  • Move importing of multiprocessing module to global scope to avoid logging module bug in Python versions up to 2.6.

Tuesday, March 27, 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.

Bug fixes:

  • Added full support for being able to use agent package with buildout. Previously the 'newrelic-admin' script was not installed correctly when buildout was being used to manage package installation.

  • Added support for versions 2.2 and 2.5 of the distributed task queuing system Celery.

  • Added support for older 'redis' client versions which did not separate commands into 'StrictRedis' and 'Redis' client objects.

  • The database table name was not always extracted properly from SQL queries where sub selects were being used, especially when additional bracketing was being used for readability. Usually this was occuring where hand crafted SQL was being generated rather than being automatically generated through an ORM or DAL.

  • Type handler registration in psycopg2 client module would fail due to agent instrumentation wrapper around connection and cursor objects.

  • Javascript header added into response of type 'text/html' when Django being used and end user monitoring enabled, would be placed into wrong location of '' element if 'X-UA-Compatible' meta tag existed. This would cause issues for IE browser clients which meta tag related to.

New features:

  • Server side configuation is now available for the Python agent. This will be of most use for Heroku installations where there is by default no agent configuration file for defining local override settings.

  • Distiguish time spent invoking the WSGI application for a request and the subsequent processing of any iterable returned by the WSGI application. These will show as nodes 'WSGI/Application' and 'WSGI/Response' in performance breakdowns and slow transaction traces. This mainly helps where iterable is a generator which performs work for each yielded item as provides proper context. Time spent in writing back a large reponse to a slow HTTP client will also be more visible.

  • Distinguish separately the time spent in the top level WSGI application callable where the agent WSGI middleware wrapper is being applied. This will be the node which gets listed immediately under 'WSGI/Application' in a slow transaction trace.

  • For Django, record separately time spent in processing certain types of form POSTs. This helps to show where being spent processing a large data upload.

  • Show content length and content type details for a request in slow transaction and error details.

  • Show content length for a response in slow transaction and error details.

Features changed:

  • Longer timeout when doing an agent test using the 'validate-config' command of the 'newrelic-admin' script. The short timeout was previously causing some users with slow DNS or networks to see the test as failing.
Tuesday, January 10, 2012 - 17:32
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.

Fixes:

  • Addressed a performance issue which would cause high CPU load, when parsing SQL queries which had a large number of values for a SQL 'IN' clause.

  • Agent version was not reported in form A.B.C.D in all cases. This was causing UI to warn that Python agent was out of date even when running version newer than the minimum recommended version.

  • When 'feedparser' module is used, now correctly track external web service requests where URI used 'feed' or feed:http' for scheme.

  • Illegal non ASCII characters in a URL could cause the agent to generate Unicode conversion warnings or outright fail a request with an exception where the character sequence could not be decoded to Unicode using the Python system default encoding.

  • The table name for a SQL query was not being correctly derived when the SQL contained a select sub query or table name aliases were being used.

  • Number of nodes captured for a slow transaction trace was not being capped properly resulted in too much data being sent through to core application. This could result in details of slow transaction being rejected by core application, or result in a timeout in UI when attempting to display the slow transaction trace.

  • SQL calls made using 'psycopg2' were failing where optional parameters argument was not supplied to database cursor 'execute()' method and the SQL contained a '%' character such as in a 'LIKE' clause.

  • Was not ignoring exception of type 'bottle.HTTPError' raised within application using Bottle. This is not a true exception but is used to programmatically indicate a non 200 HTTP response so shouldn't have been recorded as an error.

  • The 'django-piston' instrumentation was failing when an error occurred in users handler and it tried to generate an error response. This was because 'django-piston' was assuming that a handler would always be a normal function. It would therefore fail for a decorator/wrapper implemented using a class object as is used by the agent instrumentation.

New features:

  • Added support for capturing explain plans for slow SQL when using MySQL and PostgreSQL.

  • Added preliminary public API for manually instrumenting additional functions in user code and interacting with the current transaction to override how and what details about the transaction are recorded.

  • Added the 'transaction_tracer.function_trace' setting in the agent configuration file for providing a simplified way of specifying additional Python functions for which time metrics should be collected. Time spent in these functions will then appear in web transaction performance break down and slow transaction traces.

  • Added new or improved support for tracking external web service requests made using the 'urllib', 'urllib2', 'urllib3', 'httplib', 'httplib2' and 'requests' modules. Note that only time taken for the initial connect for the HTTP connection may be recorded. Uninstrumented time which appears immediately after an external web service request in a slow transaction trace made using one of these modules, will therefore possibly be the time then taken to send request data, wait for a response and consume that response data.

  • Added support for tracking external requests to a Solr service using the 'pysolr' and 'solrpy' modules. Time spent making the request will show on the overview charts as Solr time. Metrics for individual types of requests will also be listed in web transaction performance breakdown and slow transaction traces.

  • Added Django application called 'newrelic.extras.framework_django' which explicitly adds in 'newrelic_tags' tag library containing template tags for manually adding in RUM header and footer. Reliance on the old method whereby template tag library was added automatically is now deprecated and will be removed in a future version.

  • Added support for Bottle 0.10.X in Bottle specific instrumentation.

  • Added support for Redis using the 'redis' module. Support consists of tracking time spent connecting to and issuing commands against the Redis service.

  • Added support for MongoDB using the 'pymongo' module. Support consists of tracking time spent connecting to and issuing commands against the MongoDB service.

Features changed:

  • The 'capture_params' setting was defaulting to 'true' rather than 'false' resulting in the request query string parameters being reported against errors and slow transaction traces. If upgrading you will need to change the agent configuration file you are already using to change it to 'false' if capturing parameters is not desired.

  • Rollup metrics against web transactions for external web service requests will now only be recorded against the host and will not be broken out based on resource requested on the remote service.

Wednesday, November 30, 2011 - 18:10
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.

Fixes:

  • Details of errors were not being captured and passed back to the core application to be displayed by the UI when the URL for the request had query string parameters. The problem was not causing failure of the overall web application but that a problem was occuring would have been identifiable though a Python agent exception and traceback being recorded in the Python agent log file with message:

  • NameError: global name 'request_params' is not defined

  • Slow transactions were never being recorded when agent run using method where no agent configuration file was being used. This is the case for example when using Heroku.

New features:

  • Added support for the distributed task queuing system Celery. Tasks executed by a Celery server can be tracked and reported as background tasks against an application in the New Relic UI.

  • Added support for tracking as external web service requests calls made out via the pywapi module.

  • Added support for automatic wrapping of WSGI application entry point when using flup WSGI adapter for FASTCGI, SCGI and AJP.

  • Added support for meinheld as standalone WSGI server and also as a worker class when using gunicorn.

  • Added support for recording database transactions when using pyodbc.

Tuesday, November 15, 2011 - 18:47
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.

Fixes:

  • Where instrumentation was not available for the web framework or toolkit being used and web transactions were being named according to the original URL, metric normalization rules were not being correctly applied when metric grouping issues occurred due to a large number of unique URLs. This was resulting in grouping of web transactions metrics under incorrect names leading to the data presented by the UI being unhelpful or misleading.

  • Agent would fail when collecting WSGI hosting environment information when an older version of Tornado web server was used which did not provide version information. This would lead to no web transactions metrics being reported as failure occured when agent was trying to register with the New Relic core application.

  • Instrumentation of the feedparser module was not catering for the fact that the parse() function could be supplied arguments beyond just the URL to be retreived. This would result in an exception and the web transaction always failing when such additional arguments were supplied.

  • Instrumentation for Django was improved so that view handler function name was reported against a web transaction rather than URL when using Django static files mechanism.

  • Instrumentation for Django was improved so that technical 404 and 500 response handler function name was used for web transaction when appropriate.

  • Instrumentation for Django was improved to ensure that request middleware function name was always used for web transaction name when it returned a valid response.

Features changed:

  • Attributes captured from WSGI request environment such as 'REQUEST_METHOD', 'HTTP_REFERER' and 'HTTP_USER_AGENT' are now shown under the 'Request environment' category in error details and slow transaction traces rather than under 'Custom parameters'.

  • The HTTP response status for a web transaction is now shown as 'STATUS' under the 'Response properties' category in error details and slow transaction traces rather than under 'Custom parameters'.

Monday, November 14, 2011 - 18:54
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

The first general release of the Python agent. If you are using an older BETA version of the Python agent you should upgrade as soon as possible as many outstanding issues were fixed leading up to this release. No change history for older versions will be made available.

Pages