Notes
This release of the Python agent adds support for the following:
- Strands
- AWS Bedrock Converse Streaming
- Redis methods
hybrid_searchandmsetex - Langchain role assignments for LLM events
- LLM event timestamp captured at time of LLM request
loop_factoryparameter inasyncio.Runner
This release also addresses a bug in ASGI instrumentation where headers are not reported by the web server.
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 Strands
- Add instrumentation for Strands tools and agents in single and multi-agent (swarms, graphs, etc.) setups
Add support for AWS Bedrock Converse Streaming
- Add monitoring support for streaming Converse API. This includes support for Converse chat completion calls made with boto3 and aioboto3 clients using
converse_stream().
- Add monitoring support for streaming Converse API. This includes support for Converse chat completion calls made with boto3 and aioboto3 clients using
Add support for Redis methods
- Add support for the following methods:
hybrid_searchmsetex
Add support for
loop_factoryinasyncio.Runner- In Python 3.11, the
asyncio.Runnerclass was added as well as theloop_factoryparameter. Theloop_factoryparameter provides a replacement for loop policies. Now, the loop that is created is instrumented, regardless of whether it is through a global event loop setting or a custom event loop.
- In Python 3.11, the
Capture Langchain role assignments in LLM events
- Langchain
LlmChatCompletionMessageevents now contains the assigned role from Langchain.
- Langchain
Capture LLM event timestamp at time of LLM request
- Previously, the LLM event's timestamp was captured at the time of event creation. Now, it is more accurately captured at the time of the LLM request.
Bug fixes
ASGI header consumption
- When an
ASGIWebTransactionconsumes the headers from ahttp.response.startevent, it was doing so without regard to the allowable input types. When the headers are a generator, the generator was consumed by the call toprocess_response()leaving no headers remaining for the web server to send. This has now been fixed.
- When an
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.