Skip to content

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

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.

2 participants