Skip to content

PYTHON-4238 - Add Beanie version to handshake metadata#1255

Open
NoahStapp wants to merge 1 commit intoBeanieODM:mainfrom
NoahStapp:main
Open

PYTHON-4238 - Add Beanie version to handshake metadata#1255
NoahStapp wants to merge 1 commit intoBeanieODM:mainfrom
NoahStapp:main

Conversation

@NoahStapp
Copy link

This PR implements MongoDB's wrapping client library specification for the connection handshake to allow library details to be included in the metadata written to mongos or mongod logs.

For example, this change would allow server-side logs such as the following:

{
"t":{"$date":"2025-01-27T23:10:40.108Z"},"s":"I","c":"NETWORK","id":51800,"ctx":"conn16235","msg":"client metadata","attr":{"remote":"127.0.0.1:1094","client":"conn16235",
"doc":{"driver":{"name":"python|beanie","version":"4.15.0|BEANIE_VERSION"},"platform":"Python 3.13.7",
"os":{"name":"linux","architecture":"x64","version":"5.15.133+","type":"Linux"}}}
}

For anyone hosting clusters with connections coming from different applications this can help differentiate connections and facilitate log analysis.

Copy link

@Jibola Jibola left a comment

Choose a reason for hiding this comment

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

LGTM

@staticxterm
Copy link
Member

Hi @NoahStapp,
thank you, much appreciated!

@staticxterm staticxterm requested review from a team and staticxterm December 19, 2025 20:10
@staticxterm staticxterm requested a review from a team December 19, 2025 20:10
@Jibola
Copy link

Jibola commented Jan 26, 2026

@staticxterm is someone able to get this change merged?

@staticxterm
Copy link
Member

Hi @Jibola, I'll try asking the other contributors with review access on our Discord. The development seems a bit "dead" as of late.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants