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
-
Add 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
-
Add 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
-
Fix 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
-
Remove spanId from outbound tracestate header
- 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.