Skip to content

Commit

Permalink
Merge pull request #16691 from hmstepanek/python-agent-9-8-0
Browse files Browse the repository at this point in the history
Python agent 9.8.0 -- MERGE 3/28 AM(3/28 AM)
  • Loading branch information
akristen committed Mar 28, 2024
2 parents 5749eba + 8d3e1cc commit e6f130a
Showing 1 changed file with 66 additions and 0 deletions.
@@ -0,0 +1,66 @@
---
subject: Python agent
releaseDate: '2024-03-27'
version: 9.8.0
downloadLink: 'https://pypi.python.org/pypi/newrelic'
features: ['Add support for asgiref 3.8.0 and above', 'AI monitoring', 'AI monitoring configuration', 'AI monitoring public API methods', 'Add support for OpenAI', 'Add support for Langchain', 'Add support for AWS Bedrock']
bugs: []
security: []
---

## Notes

This release of the Python agent adds support for the latest versions of [asgiref](https://pypi.org/project/asgiref/) and support for AI monitoring when using the following libraries: [OpenAI](https://pypi.org/project/openai/), [AWS Bedrock](https://pypi.org/project/boto3/), and [Langchain](https://pypi.org/project/langchain/).

Install the agent using `easy_install/pip/distribute` via the [Python Package Index](https://pypi.python.org/pypi/newrelic) or download it directly from the [New Relic download site](https://download.newrelic.com/python_agent/release).


## New features

* **Add support for [asgiref](https://pypi.org/project/asgiref/) 3.8.0 and above**

* Asgiref released a new version that resulted in missing transaction context. This has been fixed.

* **AI monitoring**

* New Relic AI monitoring is the industry’s first APM solution that provides end-to-end visibility for AI Large Language Model (LLM) applications. It enables end-to-end visibility into the key components of an AI LLM application. With AI monitoring, users can monitor, alert, and debug AI-powered applications for reliability, latency, performance, security and cost. AI monitoring also enables AI/LLM specific insights (metrics, events, logs and traces) which can easily integrate to build advanced guardrails for enterprise security, privacy and compliance.
* AI monitoring offers custom-built insights and tracing for the complete lifecycle of an LLM’s prompts and responses, from raw user input to repaired/polished responses. AI monitoring provides built-in integrations with popular LLMs and components of the AI development stack. This release provides instrumentation for [OpenAI](https://pypi.org/project/openai/), [AWS Bedrock](https://pypi.org/project/boto3/), and [Langchain](https://pypi.org/project/langchain/).
* When AI monitoring is enabled with `ai_monitoring.enabled = true`, the agent will now capture AI LLM related data. This data will be visible under a new APM tab called AI Responses. See our [AI Monitoring documentation](https://docs.newrelic.com/docs/ai-monitoring/intro-to-ai-monitoring/) for more details.

* **AI monitoring configuration**

* New configuration options are available specific to [AI monitoring](https://docs.newrelic.com/docs/apm/agents/python-agent/configuration/python-agent-configuration/#ai-monitoring). These settings include:
* ai_monitoring.enabled
* ai_monitoring.streaming.enabled
* ai_monitoring.content.enabled

* **AI monitoring public API methods**

* Two new AI monitoring related public API methods have been added:
* [record_llm_feedback_event](https://docs.newrelic.com/docs/apm/agents/python-agent/python-agent-api/recordllmfeedbackevent-python-agent-api/)
* [set_llm_token_count_callback](https://docs.newrelic.com/docs/apm/agents/python-agent/python-agent-api/setllmtokencountcallback-python-agent-api/)

* **Add support for [AWS Bedrock](https://pypi.org/project/boto3/) **

* Support for AWS Bedrock Large Language Model instrumentation has been added. Chat completion and embedding data for streaming and non-streaming is recorded for the following models:
* amazon.titan-*
* ai21.j2-*
* anthropic.claude-*
* cohere.command-*
* meta.llama2-*
* amazon.titan-embed*
* cohere.embed*

* **Add support for [Langchain](https://pypi.org/project/langchain/) **

* Support for Langchain Large Language Model instrumentation has been added. Langchain Agents, Chains, Tools, OpenAI, and Bedrock LLM data is recorded. Note streaming is not supported at this time.

* **Add support for [OpenAI](https://pypi.org/project/openai/)**

* Support for OpenAI Large Language Model instrumentation has been added. Synchronous and asynchronous chat completion and embedding data is recorded. Note streaming is only supported in chat completions at this time.

## 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](/docs/new-relic-solutions/new-relic-one/install-configure/update-new-relic-agent/) about keeping agents up to date.

See the New Relic Python agent [EOL policy](/docs/apm/agents/python-agent/getting-started/python-agent-eol-policy/) for information about agent releases and support dates.

0 comments on commit e6f130a

Please sign in to comment.