Skip to content

Add client metadata#555

Open
alexbevi wants to merge 4 commits intoart049:masterfrom
alexbevi:add-client-metadata
Open

Add client metadata#555
alexbevi wants to merge 4 commits intoart049:masterfrom
alexbevi:add-client-metadata

Conversation

@alexbevi
Copy link
Copy Markdown

Similar to mongodb-labs/flask-pymongo#165, This PR will wrap the MongoClient creation with pymongo.driver_info.DriverInfo which makes it easier to filter mongod logs for connections that originate from Flask-PyMongo.

For example:

{"t":{"$date":"2024-06-03T16:10:26.686-04:00"},"s":"I","c":"NETWORK","id":51800,"ctx":"conn225","msg":"client metadata","attr":{"remote":"127.0.0.1:61857","client":"conn225","negotiatedCompressors":[],"doc":{"driver":{"name":"PyMongo|ODMantic","version":"3.11.4|0.7.0"},"os":{"type":"Darwin","name":"Darwin","architecture":"x86_64","version":"14.5"},"platform":"CPython 3.10.3.final.0"}}}

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 10, 2026

Codecov Report

❌ Patch coverage is 85.71429% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 99.12%. Comparing base (46c52c8) to head (1f1755f).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
odmantic/engine.py 85.71% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #555      +/-   ##
==========================================
- Coverage   99.22%   99.12%   -0.10%     
==========================================
  Files          52       52              
  Lines        5042     5047       +5     
  Branches      359      270      -89     
==========================================
  Hits         5003     5003              
- Misses         37       39       +2     
- Partials        2        5       +3     
Flag Coverage Δ
tests-3.10-4.4-standalone 93.65% <85.71%> (-0.02%) ⬇️
tests-3.10-5-standalone 93.65% <85.71%> (-0.02%) ⬇️
tests-3.10-6-standalone 93.65% <85.71%> (-0.02%) ⬇️
tests-3.11-4.4-standalone 93.65% <85.71%> (-0.02%) ⬇️
tests-3.11-5-standalone 93.65% <85.71%> (-0.02%) ⬇️
tests-3.11-6-standalone 93.65% <85.71%> (-0.02%) ⬇️
tests-3.12-4-replicaSet 99.04% <85.71%> (-0.02%) ⬇️
tests-3.12-4.2-sharded 93.65% <85.71%> (-0.02%) ⬇️
tests-3.12-4.4-standalone 93.65% <85.71%> (-0.02%) ⬇️
tests-3.12-5-standalone 93.65% <85.71%> (-0.02%) ⬇️
tests-3.12-6-standalone 93.65% <85.71%> (-0.02%) ⬇️
tests-3.8-4.4-standalone ?
tests-3.8-5-standalone ?
tests-3.8-6-standalone ?
tests-3.9-4.4-standalone 93.57% <85.71%> (-0.02%) ⬇️
tests-3.9-5-standalone 93.57% <85.71%> (-0.02%) ⬇️
tests-3.9-6-standalone 93.57% <85.71%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

1 participant