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 client metadata for KMongo #369

Closed
jyemin opened this issue Sep 1, 2022 · 0 comments
Closed

Add client metadata for KMongo #369

jyemin opened this issue Sep 1, 2022 · 0 comments

Comments

@jyemin
Copy link
Contributor

jyemin commented Sep 1, 2022

Currently, applications using KMongo will report the Java driver in client metadata in server logs, e.g.

{... "msg":"client metadata","attr":{"remote":"127.0.0.1:58064","client":"conn17","doc":{"driver":{"name":"mongo-java-driver|sync","version":"4.7.1"},"os":{"type":"Darwin","name":"Mac OS X","architecture":"x86_64","version":"12.5.1"},"platform":"Java/Oracle Corporation/17+35-LTS-2724"}}}

With a small change to KMongo, it will report as

{... "msg":"client metadata","attr":{"remote":"127.0.0.1:58064","client":"conn17","doc":{"driver":{"name":"mongo-java-driver|sync|kmongo","version":"4.7.1"},"os":{"type":"Darwin","name":"Mac OS X","architecture":"x86_64","version":"12.5.1"},"platform":"Java/Oracle Corporation/17+35-LTS-2724|Kotlin/1.7.10"}}}

which could be beneficial for users trying to track which connections come from which applications.

jyemin added a commit to jyemin/kmongo that referenced this issue Sep 1, 2022
zigzago pushed a commit that referenced this issue Sep 7, 2022
@zigzago zigzago closed this as completed Sep 7, 2022
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

No branches or pull requests

2 participants