Notes
This release of the Python agent adds Python 3.14 support, new environment variables for attribute filter settings, support for async generators in transaction decorators, additional models in AWS Bedrock, and new methods in AWS Kinesis. This release also fixes a bug in aiomysql which caused RecursionError when using ConnectionPool where it was wrapped multiple times, a bug where properties were not properly passed in kombu's producer, and an error when shutdown_agent is called from within the harvest thread.
Install the agent using easy_install/pip/distribute via the Python Package Index, using conda via the Conda-Forge Package Index, or download it directly from the New Relic download site.
Features
-
Add support for Python 3.14
- Add support for Python 3.14.
-
Add environment variables for attribute filters settings
-
The following settings now have the option to be set through environment variables:
| Configuration Setting | Environment variable | |-------------------------------------------|-----------------------------------------------------| | `attributes.enabled` | `NEW_RELIC_ATTRIBUTES_ENABLED` | | `attributes.exclude` | `NEW_RELIC_ATTRIBUTES_EXCLUDE` | | `attributes.include` | `NEW_RELIC_ATTRIBUTES_INCLUDE` | | `browser_monitoring.attributes.enabled` | `NEW_RELIC_BROWSER_MONITORING_ATTRIBUTES_ENABLED` | | `browser_monitoring.attributes.exclude` | `NEW_RELIC_BROWSER_MONITORING_ATTRIBUTES_EXCLUDE` | | `browser_monitoring.attributes.include` | `NEW_RELIC_BROWSER_MONITORING_ATTRIBUTES_INCLUDE` | | `error_collector.attributes.enabled` | `NEW_RELIC_ERROR_COLLECTOR_ATTRIBUTES_ENABLED` | | `error_collector.attributes.exclude` | `NEW_RELIC_ERROR_COLLECTOR_ATTRIBUTES_EXCLUDE` | | `error_collector.attributes.include` | `NEW_RELIC_ERROR_COLLECTOR_ATTRIBUTES_INCLUDE` | | `span_events.attributes.enabled` | `NEW_RELIC_SPAN_EVENTS_ATTRIBUTES_ENABLED` | | `span_events.attributes.exclude` | `NEW_RELIC_SPAN_EVENTS_ATTRIBUTES_EXCLUDE` | | `span_events.attributes.include` | `NEW_RELIC_SPAN_EVENTS_ATTRIBUTES_INCLUDE` | | `transaction_events.attributes.enabled` | `NEW_RELIC_TRANSACTION_EVENTS_ATTRIBUTES_ENABLED` | | `transaction_events.attributes.exclude` | `NEW_RELIC_TRANSACTION_EVENTS_ATTRIBUTES_EXCLUDE` | | `transaction_events.attributes.include` | `NEW_RELIC_TRANSACTION_EVENTS_ATTRIBUTES_INCLUDE` | | `transaction_segments.attributes.enabled` | `NEW_RELIC_TRANSACTION_SEGMENTS_ATTRIBUTES_ENABLED` | | `transaction_segments.attributes.exclude` | `NEW_RELIC_TRANSACTION_SEGMENTS_ATTRIBUTES_EXCLUDE` | | `transaction_segments.attributes.include` | `NEW_RELIC_TRANSACTION_SEGMENTS_ATTRIBUTES_INCLUDE` | | `transaction_tracer.attributes.enabled` | `NEW_RELIC_TRANSACTION_TRACER_ATTRIBUTES_ENABLED` | | `transaction_tracer.attributes.exclude` | `NEW_RELIC_TRANSACTION_TRACER_ATTRIBUTES_EXCLUDE` | | `transaction_tracer.attributes.include` | `NEW_RELIC_TRANSACTION_TRACER_ATTRIBUTES_INCLUDE` |
-
-
Add support for async generators in transaction decorators
- Previously, transaction decorators did not support being wrapped around async generators. This support has been added, and async generator transactions will now automatically measure event loop wait time and other statistics.
-
Add support for additional models in AWS Bedrock instrumentation
-
Updates AWS Bedrock instrumentation through botocore and aiobotocore to support the following additional models
- Claude Sonnet 3+ models
- Models that are prefixed with a region (region-aware)
-
-
Add instrumentation for new Kinesis methods
- Adds botocore instrumentation to support new AWS Kinesis methomethods
*describe_account_settings
*update_account_settings
*update_max_record_size
*update_stream_warm_throughput
- Adds botocore instrumentation to support new AWS Kinesis methomethods
Bug fixes
-
Prevent a RecursionError in aiomysql ConnectionPool
- Previously, a
RecursionErrorwould be raised in aiomysql when using pooled connections. DeepObjectProxychains were created around pooled connections due to repeated wrapping. This has been fixed.
- Previously, a
-
Fixed a bug where properties were not properly passed in kombu's producer
- Fixed a bug where instrumentation for
kombu.messaging.Producer.publish()was causing properties to accidentally be nested inside of the dictionary, causing the properties to be in the wrong spot and not read by downstream packages.
- Fixed a bug where instrumentation for
-
Fix error when
shutdown_agentis called from within the harvest thread- Previously, a
RuntimeErrorcould occur whenshutdown_agentwas called from within the harvest thread. This fixes that issue by adding a guard to prevent the crash.
- Previously, a
Support statement
We recommend updating to the latest agent version as soon as it's available. If you can't upgrade to the latest version, update your agents to a version no more than 90 days old. Read more about keeping agents up to date.
See the New Relic Python agent EOL policy for information about agent releases and support dates.