Notes
This release of the Python agent adds support for AI Monitoring server-side configuration, adds context propagation for Bedrock invocations made through Microsoft Agent Framework, fixes duplicate tool entities for LangChain tools backed by a remote MCP server, reduces race condition risk in the garbage collection data sampler, fixes inconsistent transaction names when using Wagtail, and removes byte encoding from outbound Kombu distributed tracing headers.
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.
New Features
-
Add support for AI Monitoring server-side configuration
- The Python agent now supports server-side configuration of AI Monitoring. When configured, the server-side
ai_monitoring.enabled,ai_monitoring.record_content.enabled, andai_monitoring.streaming.enabledvalues take precedence over the local settings.
- The Python agent now supports server-side configuration of AI Monitoring. When configured, the server-side
-
Add context propagation for Bedrock invocations through Agent Framework
- Propagates trace context across thread boundaries created by Microsoft Agent Framework's Bedrock integration. This allows the agent's existing botocore instrumentation to capture LLM events for Bedrock invocations made through Agent Framework. This does not add full instrumentation of Agent Framework itself.
Bugs
-
Fix inconsistent transaction names when using Wagtail
- Previously, transaction names for apps built on Wagtail were inconsistent and could be the same for different page views. This has been fixed.
-
Fix duplicate tool entities for LangChain tools backed by a remote MCP server
- Previously, when a LangChain tool was backed by a remote MCP server that was also separately instrumented, duplicate tool entities appeared in the UI. This has been fixed by gating subcomponent attributes off of LangChain tools when a known remote tool is detected.
-
Fix missing User Input field for LangChain and LangGraph MCP tool calls
- Previously, when LangChain or LangGraph used tools from an MCP server, the User Input field could be missing from AI monitoring data if the input message wasn't the last message in the streamed sequence. This has been fixed, and the agent now correctly extracts the input message in these cases.
-
Reduce race condition risk in the garbage collection data sampler
- Previously, the agent always called
gc.get_objects()to sample garbage collector object counts, regardless of configuration. This has been changed sogc.get_objects()is only called whentop_object_count_limitis configured above0, avoiding unnecessary heap iteration for customers who don't track object types collected by the garbage collector.
- Previously, the agent always called
-
Remove byte encoding from outbound Kombu distributed tracing headers
- Previously, distributed tracing headers added by Kombu instrumentation were byte-encoded, which broke transports that serialize payloads with the standard library
jsonmodule (for example, SQLAlchemy-backed transports). The byte encoding has been removed so these transports work correctly.
- Previously, distributed tracing headers added by Kombu instrumentation were byte-encoded, which broke transports that serialize payloads with the standard library
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.