Important
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 improves instrumentation for the Flask web framework and adds database monitoring support when using the pymssql client with a Microsoft SQL Server database.
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 Status of the Python agent.
New Features
Improved instrumentation for Flask
The Python agent now provides better web transaction naming and performance breakdown metrics when Flask style middleware are being used. This means that time spent in Flask
@before_request
and@after_request
functions will now be broken out as their own metrics. If a@before_request
function actually returns a response, the web transaction will be correctly named after that function rather than the Flask WSGI application entry point. These changes, in addition to being applied on middleware functions registered directly against the Flask application, will also work when Flask blueprints are used to encapsulate behavior.Browser monitoring auto-instrumentation when using Flask-Compress
When the Flask-Compress package is used to perform response compression with Flask, insertion of browser monitoring tracking code into HTML responses is now automatically performed. Previously, if Flask-Compress was being used, manual instrumentation of HTML responses would have been required.
Monitoring of MSSQL database
Instrumentation is now provided for the
pymssql
database client module to monitor database calls made against a Microsoft SQL Server database.
Bug Fixes
- When using high-security mode, the use of
newrelic.capture_request_params
in the per request WSGI environ to enable capture of request parameters, possibly by setting it using theSetEnv
directive when using Apache/mod_wsgi, was not being overridden and disabled as required. - When using the
DatabaseTrace
context manager or associated wrappers explicitly to implement a custom monitoring mechanism for database calls, the instrumentation wrappers could fail with aTypeError
exception when trying to internally derive the name of the database product being used.