Notes
This release of the Python agent adds utilization for Azure App Services, instrumentation for Azure Service Bus, support for a new Kinesis method, and support for Google ADK for v2.10.0 and above. This release also fixes an issue in httplib where distributed trace headers were duplicated as well as the setup.py installation file.
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.
Removed Features
- Removed support for Python 3.9
* Python 3.9 reached End-of-Life on October 31, 2025 and is no longer supported by the agent. Please consider upgrading your application to a supported version of Python in order to continue to receive updates to the Python Agent.
New Features
Utilization for Azure App Service
- Utilization for Azure App Service was added to enable entity relationship mapping.
- This also adds a new setting,
utilization.detect_azureappservice
New instrumentation for Azure Service Bus
- Instrumentation was added for Microsoft Azure Service Bus.
New instrumentation for new Kinesis method
- The
update_stream_record_distribution_strategymethod is now supported in Kinesis.
- The
Security Updates
The internal urllib3 package has been updated to
2.8.0to resolve all current CVEs inurllib3.- This resolves all known CVEs in the agent to date.
Enhanced Features
Support for Google ADK v2.10.0 and above.
- Instrumentation has been updated for Google ADK on versions 2.10.0 and above.
Bugs
Duplicated distributed tracing headers in httplib
- Fixed issues where
httplibinstrumentation could produce duplicate headers fortraceparent, resulting in a malformed value.
- Fixed issues where
setup.pyinstall file now works for all supported Python versions- If a user wanted to use the
setup.pyfile directly to install the Python Agent on Python 3.12 and above, they would come across anImportError. This is becausedistutilshas been deprecated since Python 3.10 and entirely removed from the standard library in Python 3.12.
- If a user wanted to use the
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.
Notes
This release of the Python agent fixes issues with signed headers in botocore (SigV4).
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.
Bugs
Fix issues with signed headers in botocore (SigV4)
- The previous change to botocore distributed tracing headers has been reverted to avoid duplicate headers being sent.
- Previously any distributed tracing headers that were generated by other tracing libraries could cause issues with instrumentation in botocore due to header signing. This has been fixed by disabling signing for these headers within botocore.
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.
Notes
This release of the Python agent adds support for OpenSearch, Microsoft Azure SQL, new Kinesis methods, and a new browser_monitoring.version setting. Additionally, improvements have been made to Anthropic, MCP, and Google ADK instrumentation. Issues with signed headers in botocore (SigV4) and Gemini tools parsing have also been fixed for this release.
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
New instrumentation for opensearch-py
- Instrumentation was added for the official OpenSearch database connector.
New instrumentation for mssql-python
- Instrumentation was added for Microsoft Azure SQL.
New instrumentation for new Kinesis methods
- The following methods are now supported in Kinesis:
create_channeldelete_channeldescribe_channellist_channelsupdate_channel
- The following methods are now supported in Kinesis:
New setting for
browser_monitoring.version- The new setting
browser_monitoring.versionenables users to specify specific versions of our Browser Monitoring Agent to be injected. - See the list of Supported Browser Agent Versions to choose from.
- The new setting
Improved Features
Improved support for anthropic.
- Improved parsing of request parameters for the Anthropic SDK on versions 1.0.0 and above.
- New parsing for responses via
Messages.with_raw_response.createenabling improved compatibility with LangChain.
Support for mcp v2.0.0 and above.
- Instrumentation has been updated following the major refactor done in
mcpv2.0.0 and should once again work as expected.
- Instrumentation has been updated following the major refactor done in
Support for Google ADK v2.9.0 and above.
- Instrumentation has been updated for Google ADK on versions 2.9.0 and above.
Bugs
Fix issues with signed headers in botocore (SigV4)
- Previously any distributed tracing headers that were generated by other tracing libraries could cause issues with instrumentation in botocore due to header signing. This has been fixed, and distributed tracing headers are now mutated before signing.
Fix Gemini tools parsing
- Previously, some instances of tools created with Gemini would fail to parse and would silently fail, resulting in no response for that specific request. This has been fixed.
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.
Notes
This release of the Python agent adds support for Azure CosmosDB, adds instrumentation for HTTPX2 and new LangChain/LangGraph streaming events APIs, adds support for newer OpenTelemetry database semantic conventions, and resolves several issues including incomplete package reporting, a package lookup performance penalty, and a MySQL database name reporting bug.
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
Added support for Azure CosmosDB
- The Python agent now instruments Azure Cosmos DB client operations, reporting datastore metrics and traces for database, container, and user operations performed through the
azure-cosmosSDK.
- The Python agent now instruments Azure Cosmos DB client operations, reporting datastore metrics and traces for database, container, and user operations performed through the
Added support for HTTPX2
Added LangChain/LangGraph streaming events instrumentation
Added support for newer OpenTelemetry database semantic conventions
- When running the Python agent alongside OpenTelemetry (Hybrid Agent mode), the agent now reads both the legacy and newer OpenTelemetry database span attribute names (
db.name/db.namespace,db.statement/db.query.text,db.mongodb.collection/db.collection.name), so database tracing continues to work correctly regardless of which semantic convention version the OpenTelemetry instrumentation library emits.
- When running the Python agent alongside OpenTelemetry (Hybrid Agent mode), the agent now reads both the legacy and newer OpenTelemetry database span attribute names (
Bugs
Fixed incomplete package reporting to New Relic
- Previously, the Python agent could omit some installed packages from the Environment data reported to New Relic if module discovery took longer than the fixed time window allotted during the slow harvest cycle, and the package list wasn't refreshed after an agent restart. Package capture now runs during the fast harvest cycle and is fully re-captured on agent shutdown/restart, so the reported package list is complete.
Reduced overhead of package version lookups
- Previously, looking up installed package versions rescanned the filesystem for every package on every lookup, incurring an O(n^2) time penalty that scaled with the number of installed packages during agent initialization. The result of
importlib.metadata.packages_distributions()is now cached after the first lookup to avoid this overhead.
- Previously, looking up installed package versions rescanned the filesystem for every package on every lookup, incurring an O(n^2) time penalty that scaled with the number of installed packages during agent initialization. The result of
Fixed
get_linking_metadatato properly pass through the specified application- Previously, calling
newrelic.agent.get_linking_metadata(application=...)ignored theapplicationargument and always returned linking metadata for the default application. This affected processes reporting to more than one application. The specified application is now correctly passed through. - Thank you ckarnell for the contribution!
- Previously, calling
Fixed MySQL database name reporting when using the
databasekeyword argument- Previously, the agent only checked the legacy
dbkeyword argument when parsing the database name from mysql-connector-python connection arguments, so connections made using the moderndatabasekeyword argument reported no database name in datastore metrics. The agent now checksdatabasefirst, falling back todb.
- Previously, the agent only checked the legacy
Fixed warning when accessing LangGraph v1.1+
GraphOutputvalues- Previously, LangGraph v1.1+ instrumentation accessed
GraphOutputreturn values using deprecated item-access syntax, triggering a deprecation warning. The agent now readsGraphOutput.valuedirectly.
- Previously, LangGraph v1.1+ instrumentation accessed
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.
Notes
This release of the Python agent adds support for Redis commands introduced in Redis v8.10.0 and redis-py v8.1.0. This release also resolves the issue of missing LlmChatCompletion events in LangChain when using MCP tools.
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
Added Redis commands introduced in Redis v8.10.0 and redis-py v8.1.0
- The Python agent now supports the following recently added commands in Redis:
himport_discard_allhimport_discardhimport_preparelmovemnrangenrevrangequerylabelsreadsdiffcardsunioncardaliaslist
- The Python agent now supports the following recently added commands in Redis:
Bugs
Fixed missing LlmChatCompletion events in Gemini when using MCP tools
Swapped to trace cache ID in LangChain and Agent Framework
- For context propagation purposes, swap the LangChain and Agent Framework instrumentation to only store the trace cache ID rather than the full trace in a reference attribute. This is to prevent these objects from getting serialized unexpectedly in the case of leaks. The ID is a much smaller object while the trace could contain MBs of data.
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.
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.
Notes
This release of the Python agent adds instrumentation support for Google ADK, adds token counting for multiple AI providers (Anthropic, Google GenAI, OpenAI, and AWS Bedrock), reduces outbound tracestate header size, and fixes a crash in graphql-core instrumentation.
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.
Improved Features
Added instrumentation for Google ADK
- The Python agent now instruments Google ADK (Agent Development Kit) AI agent workflows.
- Instrumented components include:
LlmAgentlinked to Gemini or VertexAI backends viagoogle.genai- User-defined
FunctionToolinstances - Sub-agent workflows including child agents and
AgentToolinstances - Multi-agent workflows including the
Workflowclass and deprecatedLoopAgent,ParallelAgent, andSequentialAgentclasses
Added token counting for Anthropic, Gemini, OpenAI, and Bedrock
- The Python agent now reports token counts for all LLM invocations across multiple AI providers:
- Anthropic SDK
- Google GenAI SDK
- OpenAI SDK
- AWS Bedrock via botocore and aiobotocore
- The Python agent now reports token counts for all LLM invocations across multiple AI providers:
Bugs
Fixed instrumentation crash for graphql-core v3.2.10
- Previously, graphql-core v3.2.10 renamed the
errorsattribute tocollected_errorsinExecutionContext, causing the agent to crash. This has been fixed, and the agent now works correctly with graphql-core v3.2.10 and later.
- Previously, graphql-core v3.2.10 renamed the
Removed
spanIdfrom outboundtracestateheader- Previously, the agent included
spanIdin the outboundtracestateheader. BecausespanIdis already present in thetraceparentheader, this was unnecessary duplication. ThespanIdhas been removed fromtracestateto reduce outbound header size.
- Previously, the agent included
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.
Notes
This release of the Python agent adds additional model information to LangChain Chain LLM events, and fixes a bug in LangGraph streaming instrumentation.
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.
Improved Features
Add additional model information to LangChain Chain LLM events
- Add
request.modelandresponse.modelattributes to LLM events produced by LangChain Chains. - This information is pulled on a best effort basis and may not always be available.
- Add
Bugs
Fix TypeError in LangGraph streaming instrumentation
- Previously, when using a subset of streaming APIs in LangGraph, the agent would encounter a
TypeErrordue to the use ofweakref.WeakMethodby LangGraph. This has been fixed, and the agent should now work correctly with those LangGraph streaming methods.
- Previously, when using a subset of streaming APIs in LangGraph, the agent would encounter 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.
Notes
This release of the Python agent adds support for multiple new Redis commands, fixes a bug in LangGraph instrumentation, and improves handling and logging of harvest limit settings.
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.
Improved Features
Add instrumentation for new Redis v8.8.0 commands
- Add instrumentation for the following new Redis commands from redis-py v8.8.0:
- Misc commands: INCREX, XNACK
- Array commands: ARCOUNT, ARDEL, ARDELRANGE, ARGET, ARGETRANGE, ARGREP, ARINFO, ARINSERT, ARLASTITEMS, ARLEN, ARMGET, ARMSET, ARNEXT, AROP, ARRING, ARSCAN, ARSEEK, ARSET
- Add instrumentation for the following new Redis commands from redis-py v8.8.0:
Bugs
Fix crash in LangGraph instrumentation
- Previously, when using LangGraph instrumentation, the agent would crash due to an issue with context propagation to jobs in AsyncBackgroundExecutor. This has been fixed, and the agent should now work correctly with LangGraph.
Improved handling and logging of harvest limit settings
- The agent now more accurately reports the list of harvest methods and limits to the Environment tab in New Relic One.
- The agent now has more consistent debug logging on startup for harvest limit settings.
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.
Notes
This release of the Python agent fixes a context propagation issue in LangChain and LangGraph, an OpenAI chat completion recording issue, and an issue when using OpenAI(https://pypi.org/project/openai) streaming through LiteLLM as a proxy.
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.
Bugs
Fix context propagation in LangChain and LangGraph
Fix an OpenAI chat completion recording issue
- OpenAI reintroduced logic that closes the streaming response even if the consumer hasn't read all data. Previously, the chat completion data was only recorded when reaching the stream's end which resulted in chat completion data not being recorded at the closing of the stream. Logic has now been added to capture the chat completion data even if the stream has not been fully read.
Fix an issue when using OpenAI streaming through LiteLLM as a proxy
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.