Adding support for the new mongodb-driver-sync library#2241
Adding support for the new mongodb-driver-sync library#2241SylvainJuge merged 29 commits intoelastic:mainfrom juliovalcarcel:MongoClient4
Conversation
Hi, @juliovalcarcel And also now |
|
Hi! We just realized that we haven't looked into this issue in a while. We're sorry! We're labeling this issue as |
|
@kananindzya Thank you for the feedback and sorry for the delay in response but I have rebased my branch onto main and fixed the issues you found as well as fixed both tests. Included are tests for all current minor 4.x versions. Please let me know if there are any additional fixes that you see need to be made and I will try to get to them much quicker. |
|
I wanted to check and see if there was a plan to review/merge this? Or should I wait to rebase it and fix the conficts? |
|
Hi @juliovalcarcel we have added this to our short-term backlog, thus we expect to be able to handle it soon (but can't guarantee any precise ETA as unexpected priorities tend to get the last word). |
|
@SylvainJuge okay, I will work to rebase it and will keep an eye out for any comments to keep it moving forward. Thanks! |
This splits mongoclient into a v3 and a v4 package and updates the v4 to use the new classes. Additional work is needed to fix the IT for v4 and to deduplicate code across v3 and v4
|
Branch has been rebased on my end. Please let me know what feedback there is and I will resolve it ASAP. |
|
Hi @juliovalcarcel , after trying a few different approaches for 4.x driver I think the approach used in this PR is the right one. Thus going forward we can either:
In all cases the final result will be squashed in a single commit when merged in |
|
Quick update: I have pushed my changes to this branch so the original contributions of @juliovalcarcel are still there even if slightly altered and this PR should now be closer to be merged. My approval is only to allow running in CI for now. |
SylvainJuge
left a comment
There was a problem hiding this comment.
Approving to allow running in CI.
|
@SylvainJuge you let me know how I should help. Sorry for the delay, I was on vacation and just got back. I am okay with all the approaches but am all good with the blind trust :) |
|
@juliovalcarcel I've merged the changes in this PR branch, thus I've closed the humongous "trust me I know what I do" PR. |
|
@elasticmachine run elasticsearch-ci/docs |
...3-plugin/src/main/java/co/elastic/apm/agent/mongodb/v3/ConnectionCommandInstrumentation.java
Show resolved
Hide resolved
|
@elasticmachine run elasticsearch-ci/docs |
|
@elasticmachine run elasticsearch-ci/docs |
This starts to address #1547 and more specifically enables the new mongodb-driver-sync to work with Spring Boot's MongoDB starter by default. I did this by following what was done for Cassandra and splitting mongoclient into a v3 and a v4 package. The v4 package is setup to start using the mongodb-driver-sync dependency and is updated to use the new classes.
I am having problems with the MongoDriverSyncInstrumentationIT and getting it to run without falling, but all unit tests passed (Just duplicated currently from v3 with minor tweaks). I could use some help from someone on what needs to be revised for the IT and then I will add additional versions to the IT.
There is definitely room for deduplication between the v3 and v4 drivers but I wanted to get a working version up and running for feedback.
Updated checklist after feedback
Checklist
EDT:
Closes #1547