Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add python agent release notes for 10.0.0 - PLEASE MERGE SEPTEMBER 27th 2024 AM #18735

Merged
merged 7 commits into from
Sep 30, 2024

Conversation

hmstepanek
Copy link
Contributor

Give us some context

  • Add release notes for Python agent release 10.0.
  • Update docs to remove Python 2.7 support.

Copy link

Hi @hmstepanek 👋

Thanks for your pull request! Your PR is in a queue, and a writer will take a look soon. We generally publish small edits within one business day, and larger edits within three days.

We will automatically generate a preview of your request, and will comment with a link when the preview is ready (usually 10 to 20 minutes).

Copy link

netlify bot commented Sep 20, 2024

Deploy Preview for docs-website-netlify ready!

Name Link
🔨 Latest commit 2862936
🔍 Latest deploy log https://app.netlify.com/sites/docs-website-netlify/deploys/66f5d5bc346ae5000880e51f
😎 Deploy Preview https://deploy-preview-18735--docs-website-netlify.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@cbehera-newrelic cbehera-newrelic self-assigned this Sep 23, 2024
@cbehera-newrelic cbehera-newrelic added content requests related to docs site content from_internal Identifies issues/PRs from Relics (except writers) labels Sep 23, 2024
@hmstepanek hmstepanek marked this pull request as ready for review September 24, 2024 23:30
Copy link
Contributor

@lrafeei lrafeei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for putting together the release notes! I had a few tweaks, mostly nitpicky sentence structure stuff but there is also the gRPC/GraphQL question as well.

Also, should Python 2.7 have a space between "Python" and "2.7"? In code we definitely write it as one word, but I thought it was separated into two words when writing it text.

@@ -0,0 +1,76 @@
---
subject: 'Python agent'
releaseDate: '2024-08-08'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

releaseDate: '2024-09-26'


## Notes

This release of the Python agent drops support for Python2.7, adds a Kafka server metric, capturing of memcache host and port, support for [kafka-python-ng](https://pypi.org/project/kafka-python-ng/), support for [uvicorn_worker](https://pypi.org/project/uvicorn-worker/), an environment variable for GC runtime metrics, and automatically detects the function signature in [LangChain](https://pypi.org/project/langchain/) `similarity_search`. It also fixes a bug in [graphql](https://pypi.org/project/graphql/) entity name detection, an issue in [LangChain](https://pypi.org/project/langchain/) where a thread is started and the transaction context is lost, parsing of the request and response when running [OpenAI](https://pypi.org/project/openai/) via [LangChain](https://pypi.org/project/langchain/), [pyscopg](https://pypi.org/project/psycopg/) v3 API incompatibilities, and instruments a new path to the [OpenAI](https://pypi.org/project/openai/) chat class.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is a big enough list that we should use bullet points. Something like this:

This release of the Python agent drops support for Python2.7 and adds the following:

  • a Kafka server metric
  • host and port attributes for memcache
  • support for kafka-python-ng
  • support for uvicorn_worker
  • an environment variable for garbage collector (GC) runtime metrics
  • automatic detection for the function signature in LangChain's similarity_search
  • updated support for OpenAI's chat class
  • a fix for a bug in graphql's entity name detection
  • a fix for transaction context propagation loss in LangChain in the case of a new thread
  • parsing of the request and response when running OpenAI via LangChain
  • a fix for pyscopg v3 API incompatibilities


* Adds a metric to capture the host and port information for Kafka entities on both consumers and producers. This metric allows the UI to link AWS information with AWS MSK entities in the service map.

* Add capturing of memcache host and port
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use backticks on the words host and port since those are the actual attribute names


* Add capturing of memcache host and port

* Adds capturing of host and port info on memcache libraries; bmemcached, aiomcache, and pymemcache. This allows the UI to link AWS information with AWS memcache entities in the service map.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should use backticks on the words host and port but also, tweak the first sentence to say this:

Adds capturing of host and port info on the following memcache libraries: bmemcached, aiomcache, and pymemcache.

(changes made: backticks, colon to denote list instead of semicolon, and pypi links to libraries)


* Add environment variable for GC runtime metrics

* GC runtime metircs can now be enabled/disabled via the following environment variable: NEW_RELIC_GC_RUNTIME_METRICS_ENABLED.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we write out the word "garbage collector" in the description? On the small chance that someone searching the docs might not realize immediately what GC is?

Also, we should add backticks to the environment variable name


* Remove Python2.7 Support

* Removes compatibility with Python2.7. Also removes instrumentations that were only supported on Python2.7.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removes compatibility with Python2.7. Also removes support for the following libraries that were only supported on Python2.7:


* Fix bug in graphql entity name detection

* Previously, the graphql channel entity name would be missing the first couple characters. This bug has been fixed.
Copy link
Contributor

@lrafeei lrafeei Sep 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the PR this is referencing: newrelic/newrelic-python-agent#1206 if so, this is gRPC and we should change that in the summary, metadata, and this section

Assuming this is for gRPC, let's change the sentence to something like this:
Previously, the gRPC channel entity name was missing the first character(s) in specific cases. This bug has been fixed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OMG Yes that is the PR and I'm special.


* Instrument new path to [OpenAI](https://pypi.org/project/openai/) chat class

* [OpenAI](https://pypi.org/project/openai/) moved the ChatCompletions class to a different path which prevented the instrumentation from being applied. This has been fixed.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add backticks to ChatCompletions class name

Copy link
Contributor

@lrafeei lrafeei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right now, by removing the Python 2.7 row, we're left with just the table headers.
We can maybe add a column for Python 3.7 and 3.8 (even though 3.8's drop date eligibility won't be for another year) with the EOL date and dates for dropping support TBD.


* GC runtime metircs can now be enabled/disabled via the following environment variable: NEW_RELIC_GC_RUNTIME_METRICS_ENABLED.

## Deprecations
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we move this section to come first before New Features since it is most important for this release?


## Notes

This release of the Python agent drops support for Python2.7, adds a Kafka server metric, capturing of memcache host and port, support for [kafka-python-ng](https://pypi.org/project/kafka-python-ng/), support for [uvicorn_worker](https://pypi.org/project/uvicorn-worker/), an environment variable for GC runtime metrics, and automatically detects the function signature in [LangChain](https://pypi.org/project/langchain/) `similarity_search`. It also fixes a bug in [graphql](https://pypi.org/project/graphql/) entity name detection, an issue in [LangChain](https://pypi.org/project/langchain/) where a thread is started and the transaction context is lost, parsing of the request and response when running [OpenAI](https://pypi.org/project/openai/) via [LangChain](https://pypi.org/project/langchain/), [pyscopg](https://pypi.org/project/psycopg/) v3 API incompatibilities, and instruments a new path to the [OpenAI](https://pypi.org/project/openai/) chat class.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like Python2.7 is officially written out as Python 2.7 with a space between the language and version so we may want to update that throughout these release notes: (ex: https://www.python.org/download/releases/2.7/)

@@ -0,0 +1,76 @@
---
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added one more PR into this release since it's a bug fix for a customer so we will want to add that into the release notes as well. Here's the PR: newrelic/newrelic-python-agent#1222

releaseDate: '2024-08-08'
version: 10.0.0
downloadLink: 'https://pypi.python.org/pypi/newrelic'
features: ['Remove Python2.7 support', 'Add Kafka server metric', 'Add capturing of memcache host and port', 'Add support for kafka-python-ng', 'Add support for uvicorn_workers', 'Automatically detect function signature in LangChasimilarity search', 'Add environment variable for GC runtime metrics']
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
features: ['Remove Python2.7 support', 'Add Kafka server metric', 'Add capturing of memcache host and port', 'Add support for kafka-python-ng', 'Add support for uvicorn_workers', 'Automatically detect function signature in LangChasimilarity search', 'Add environment variable for GC runtime metrics']
features: ['Remove Python2.7 support', 'Add Kafka server metric', 'Add capturing of memcache host and port', 'Add support for kafka-python-ng', 'Add support for uvicorn_workers', 'Automatically detect function signature in LangChain similarity search', 'Add environment variable for GC runtime metrics']

releaseDate: '2024-09-26'
version: 10.0.0
downloadLink: 'https://pypi.python.org/pypi/newrelic'
features: ['Remove Python 2.7 support', 'Add Kafka server metric', 'Add capturing of memcache host and port', 'Add support for kafka-python-ng', 'Add support for uvicorn_workers', 'Automatically detect function signature in LangChasimilarity search', 'Add environment variable for GC runtime metrics']
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
features: ['Remove Python 2.7 support', 'Add Kafka server metric', 'Add capturing of memcache host and port', 'Add support for kafka-python-ng', 'Add support for uvicorn_workers', 'Automatically detect function signature in LangChasimilarity search', 'Add environment variable for GC runtime metrics']
features: ['Remove Python 2.7 support', 'Add Kafka server metric', 'Add capturing of memcache host and port', 'Add support for kafka-python-ng', 'Add support for uvicorn_workers', 'Automatically detect function signature in LangChain similarity search', 'Add environment variable for garbage collection runtime metrics']


* Fix issue in [LangChain](https://pypi.org/project/langchain/) where a thread is started and the transaction context is lost

* Previously, when calling some chains like retreival chains, the transaction would be lost and instrumentation would be broken because a thread would be started by [LangChain](https://pypi.org/project/langchain/). This has been fixed so the transaction context is passed across threads and instrumentation still works for retreival chains.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* Previously, when calling some chains like retreival chains, the transaction would be lost and instrumentation would be broken because a thread would be started by [LangChain](https://pypi.org/project/langchain/). This has been fixed so the transaction context is passed across threads and instrumentation still works for retreival chains.
* Previously, when calling some chains like retrieval chains, the transaction would be lost and instrumentation would be broken because a thread would be started by [LangChain](https://pypi.org/project/langchain/). This has been fixed so the transaction context is passed across threads and instrumentation still works for retrieval chains.

@hmstepanek hmstepanek changed the title Add python agent release notes for 10.0 - DO NOT MERGE Add python agent release notes for 10.0 - PLEASE MERGE SEPTEMBER 27th 2024 AM Sep 26, 2024
@hmstepanek hmstepanek changed the title Add python agent release notes for 10.0 - PLEASE MERGE SEPTEMBER 27th 2024 AM Add python agent release notes for 10.0.0 - PLEASE MERGE SEPTEMBER 27th 2024 AM Sep 26, 2024
Copy link
Contributor

@cbehera-newrelic cbehera-newrelic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cbehera-newrelic cbehera-newrelic merged commit 42bd6de into newrelic:develop Sep 30, 2024
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content requests related to docs site content from_internal Identifies issues/PRs from Relics (except writers)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants