Skip to content

feat: adding instrumentation support for mongo-driver/v2 #6539

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

Merged
merged 49 commits into from
May 7, 2025

Conversation

AlaricWhitney
Copy link
Contributor

Adding the mongo-driver/v2 instrumentation.

This is a copy/paste of the v1 instrumentation, and was modified to adhere to the mongo-driver/v2 requirements.

Notable differences:

  • mtest was removed in v2. Replaced with drivertest in the unit testing.

This addresses PR #6419

@AlaricWhitney AlaricWhitney requested a review from a team as a code owner December 28, 2024 17:52
Copy link

linux-foundation-easycla bot commented Dec 28, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

Copy link

codecov bot commented Jan 7, 2025

Codecov Report

Attention: Patch coverage is 91.05691% with 11 lines in your changes missing coverage. Please review.

Project coverage is 81.2%. Comparing base (d586e31) to head (229c628).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...ngodb.org/mongo-driver/v2/mongo/otelmongo/mongo.go 88.5% 8 Missing and 3 partials ⚠️
Additional details and impacted files

Impacted file tree graph

@@          Coverage Diff           @@
##            main   #6539    +/-   ##
======================================
  Coverage   81.1%   81.2%            
======================================
  Files        204     207     +3     
  Lines      18140   18263   +123     
======================================
+ Hits       14723   14832   +109     
- Misses      2999    3009    +10     
- Partials     418     422     +4     
Files with missing lines Coverage Δ
...godb.org/mongo-driver/v2/mongo/otelmongo/config.go 100.0% <100.0%> (ø)
...odb.org/mongo-driver/v2/mongo/otelmongo/version.go 100.0% <100.0%> (ø)
...ngodb.org/mongo-driver/v2/mongo/otelmongo/mongo.go 88.5% <88.5%> (ø)

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dmathieu
Copy link
Member

cc @prestonvasquez for review?

Copy link
Member

@prestonvasquez prestonvasquez left a comment

Choose a reason for hiding this comment

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

@AlaricWhitney Thank you for putting this together. I wanted to let you know that I'll be reviewing this in stages, as my schedule allows.

@jakenmbe
Copy link

can this pr merge? I need use it in my project

@dmathieu
Copy link
Member

Not until all review comments have been closed an it has been approved.

@guillaumelcv
Copy link

thank's @AlaricWhitney for your work
I'm waiting impatiently for a final validation to update my infra to mongdb v2.
If a reviewer could do the last review step 🙏

@AlaricWhitney
Copy link
Contributor Author

@dmathieu is there anything else to do to get this merged?

@dmathieu
Copy link
Member

cc @open-telemetry/go-approvers for second review.

Copy link
Member

@XSAM XSAM left a comment

Choose a reason for hiding this comment

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

LGTM

@dmathieu dmathieu merged commit a1102cd into open-telemetry:main May 7, 2025
26 of 27 checks passed
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.

9 participants