Notes
This release of the Python agent adds new ways of passing errors to notice_error(), adds support for Strands-Agent synchronous tool error capturing, adds support for gpt-5 and newer OpenAI LLM models, and fixes a crash in Azure Functions' utilization logic.
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 exception instances as arguments to
notice_error()notice_error()can now accept a caught exception instance (such as one from a try/except block) for theerrorargument, rather than an exception tuple fromsys.exc_info().This is in addition to and does not replace the existing behavior. Previous usage of
notice_error()with zero arguments or with an exception tuple should still function correctly.
Add support for
gpt-5and newer OpenAI LLM models- Add updates to OpenAI instrumentation to support newer attribute names used with later OpenAI models
Add support for Strands-Agent synchronous tool error capturing
- Synchronous Python functions used as tools in Strands-Agents now have proper error capturing, and capture traces within tools such as database lookups.
Bug fixes
Guard against crashes in Azure Functions utilization
- Previously, some users experienced edge cases where Azure Functions utilization detection would crash when attempting to match regular expressions. The crash has been fixed, and should no longer be possible in the future.
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.