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

Instrument PyMongo AsyncMongoClient #1254

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open

Conversation

TimPansino
Copy link
Contributor

Overview

  • Add instrumentation and testing for PyMongo's AsyncMongoClient
  • Update instrumentation of existing synchronous MongoClient with newly added methods
  • Add test to validate that there are no uninstrumented future client methods
  • Add instance info to existing synchronous MongoClient for simple cases
    • Load balancing setups intentionally left without instance info to avoid reporting confusing and often incorrect information about query routing.

@TimPansino TimPansino requested a review from a team as a code owner November 19, 2024 19:19
Copy link

github-actions bot commented Nov 19, 2024

🦙 MegaLinter status: ✅ SUCCESS

Descriptor Linter Files Fixed Errors Elapsed time
✅ PYTHON bandit 2 0 4.72s
✅ PYTHON black 6 0 0 2.11s
✅ PYTHON flake8 6 0 1.11s
✅ PYTHON isort 6 0 0 0.37s
✅ PYTHON pylint 6 0 7.25s
✅ YAML prettier 1 1 0 1.02s
✅ YAML v8r 1 0 2.08s
✅ YAML yamllint 1 0 0.53s

See detailed report in MegaLinter reports
Set VALIDATE_ALL_CODEBASE: true in mega-linter.yml to validate all sources, not only the diff

MegaLinter is graciously provided by OX Security

@codecov-commenter
Copy link

codecov-commenter commented Nov 19, 2024

Codecov Report

Attention: Patch coverage is 92.85714% with 4 lines in your changes missing coverage. Please review.

Project coverage is 81.17%. Comparing base (f2cdd3e) to head (15d82e6).

Files with missing lines Patch % Lines
newrelic/hooks/datastore_pymongo.py 92.45% 1 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1254      +/-   ##
==========================================
+ Coverage   81.15%   81.17%   +0.02%     
==========================================
  Files         200      200              
  Lines       21953    21999      +46     
  Branches     3479     3485       +6     
==========================================
+ Hits        17816    17858      +42     
- Misses       2986     2988       +2     
- Partials     1151     1153       +2     

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


🚨 Try these New Features:

@mergify mergify bot removed the tests-failing label Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants