Notes
This release of the Python agent includes minor bug fixes.
Bug Fixes
- Fix incorrect wrapper in grpc instrumentation.
_MultiThreadedRendezvous._next
was wrapped with the instrumentation designed for _MultiThreadedRendezvous.result
. This issue has been resolved as of this agent version.
Notes
This release of the Python agent updates transaction naming for Starlette and FastAPI, and includes bug fixes.
The agent can be installed using easy_install/pip/distribute via the Python Package Index or can be downloaded directly from the New Relic download site.
Improved Features
Updated transaction naming for middleware in Starlette and FastAPI
The transaction naming hierarchy has been updated for Starlette and FastAPI applications. The web transaction name is named after the route handler, or after middleware if an exception is raised in the middleware.
Bug Fixes
RuntimeError for imports occurring on a background thread
A RunTimeError was being raised in the event of imports occurring on a background thread during iteration over sys.modules. This issue has been resolved in this agent version.
Fixed region aware license key default host setting
This agent version contains a fix for setting the default host value based on the license key for EU license keys. Setting the host manually will still override the default host value set by the license key.
Notes
This release of the Python agent adds instrumentation for Starlette and FastAPI.
The agent can be installed using easy_install/pip/distribute via the Python Package Index or can be downloaded directly from the New Relic download site.
Deprecations
Python 3.5 has been deprecated
Python 3.5 has reached end of life and support will be dropped in a future release. Using the agent with Python 3.5 will generate a deprecation warning. Updating Python versions is recommended.
New Features
Adds Starlette framework instrumentation
Starlette applications will now be automatically instrumented. Transaction data will be collected and recorded for application routes, background tasks, exception handlers, and installed middleware. Exception logging has also been added.
Adds FastAPI framework instrumentation
FASTAPI applications will also now be automatically instrumented. See above for instrumentation details.
Bug Fixes
Fix deprecation warning for find_loader in python 3
Using the agent no longer generates a deprecation warning for find_loader. The call to find_loader has been replaced with find_spec.
Notes
This release of the Python agent adds support for Python 3.9 and includes bug fixes.
The agent can be installed using easy_install/pip/distribute via the Python Package Index or can be downloaded directly from the New Relic download site.
Bug Fixes
Duplicate warnings were logged repeatedly when using the agent with Python 3
The agent internally suppressed any warnings generated when data was sent via HTTP to New Relic in a way that caused the warning filters to mutate. This caused the cache of already printed warnings to be cleared, resulting in duplicate warnings after every data harvest. The agent no longer mutates the process warning filters on a background thread, resulting in consistent warning behavior.
AttributeError when passing an inactive transaction into ExternalTrace.generate_request_headers
When passing an inactive transaction into ExternalTrace.generate_request_headers, an AttributeError was generated. This agent version contains additional validation for the transaction argument in ExternalTrace.generate_request_headers.
The infinite tracing host configuration value did not have sufficient validation
When passing a URL or other invalid host to the infinite tracing host configuration, the agent accepted this value unchecked to use in the host parameter for later connections via grpc. The agent now validates this configuration and attempts to correct for invalid hosts if it is able to detect the host. If a host is not detected, the agent automatically falls back to infinite tracing disabled and logs an error.
Notes
This release of the Python agent adds instrumentation for uvicorn and asyncpg.
The agent can be installed using easy_install/pip/distribute via the Python Package Index or can be downloaded directly from the New Relic download site.
New Features
Adds uvicorn instrumentation
ASGI applications are now automatically wrapped when using the uvicorn ASGI server.
Adds asyncpg instrumentation
Support has been added for recording database transactions when using asyncpg database client module for PostgresSQL.
Improved Features
Adds db.operation attribute
A new attribute, db.operation, was introduced for datastore traces. This value is recorded only when db.statement is not reported, and represents an operation triggered by methods other than running a DB statement.
Notes
This release of the Python agent adds new ASGI apis and upgrades wrapt.
The agent can be installed using easy_install/pip/distribute via the Python Package Index or can be downloaded directly from the New Relic download site.
New Features
Adds support for ASGI applications via built in APIs
ASGI applications can now be timed via middleware-like API calls. Browser monitoring JS is automatically injected into HTML pages by the ASGI browser monitoring middleware for instrumented applications. See the asgi_application docs for details on API usage.
Upgrades wrapt to 1.12.1
This version of the agent ships with wrapt 1.12.1.
Notes
This release of the Python agent includes bug fixes.
The agent can be installed using easy_install/pip/distribute via the Python Package Index or can be downloaded directly from the New Relic download site.
Bug fixes
Fix invalid payloads generated when using serverless mode
When using serverless mode on the Python Agent versions v5.16.0 and v5.16.1, invalid serverless/lambda payloads were generated. The agent now generates the proper payloads in serverless mode.
Notes
This release of the Python agent introduces manylinux wheels and includes bug fixes.
The agent can be installed using easy_install/pip/distribute via the Python Package Index or can be downloaded directly from the New Relic download site.
Bug fixes
Data was erroneously discarded when an HTTP protocol error occurred
When an unexpected HTTP error occurred (such as a timeout), data was erroneously discarded. Data is now downsampled and retransmitted when an HTTP protocol error occurs.
Error when installing with an incompatible setuptools_scm version
The version requirements were not correctly set for the setuptools_scm build time requirement, which may have resulted in an error at installation. The version requirements for setuptools_scm are now set appropriately.
Notes
This release of the Python agent changes the internal http client from requests to urllib3, updates logging, and includes bug fixes.
The agent can be installed using easy_install/pip/distribute via the Python Package Index or can be downloaded directly from the New Relic download site.
Improved Features
The NewRelicContextFormatter now records extras
When using the
NewRelicContextFormatter
log formatter, extras are now automatically captured and recorded in the New Relic agent logs product.The agent now internally uses urllib3
The python agent previously used requests as its http client. The agent now uses urllib3 internally for HTTP communication with New Relic data ingest services.
Bug fixes
Fix gRPC application crash when credentials are supplied
When using the credentials argument, the agent's built in gRPC instrumentation caused an application crash. This crash has been fixed.
Fix Tornado framework crashes when finish is called from a different task
When finish is called from a different task, applications using the Tornado framework may crash. This crash has been fixed.
Notes
This release of the Python agent includes a bug fix.
The agent can be installed using easy_install/pip/distribute via the Python Package Index or can be downloaded directly from the New Relic download site.
Bug fixes
When using newrelic-admin run-program on Python 2.7 applications failed to start
Using the newrelic-admin run-program on Python 2.7 with the 5.14.0 agent resulted in an application crash. Applications now start as expected on Python 2.7.