-
Notifications
You must be signed in to change notification settings - Fork 93
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
Fix MongoDB instrumentation for 2.29.0+ #3668
Conversation
@nrcventura, @zacharycmontoya, @rajkumar-rangaraj, @pjanotti What is your opinion? Do you see any better options? |
I think that this proposed workaround makes sense in the short and medium term. I do not think we should use alternatives 1 and 2. In the long term it would be good to pursue alternative 3. |
If the newer versions of the library break backwards compatibility, we may need to consider a different approach, or potentially dropping support for certain versions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Kielek I think the workaround is acceptable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with @pjanotti, this is an acceptable workaround.
Thank you guys. Merging and moving forward with release. |
Why
Fixes #3667 (comment)
What
Fixes loading MongoDB related assemblies.
MongoDB.Driver.Core 2.28.0+ are signed. What is more MongoDB does not follow recommendation about Assembly Versioning and Assembly Version is Equal to Library version (2.28.0.0 and 2.29.0.0).
MongoDB.Driver.Core.Extensions.DiagnosticSources references MongoDB.Driver.Core v2.28.0.
When the test application is using MongoDB.Driver.Core v2.28.0. It leads to following error:
Workaround - ignore versioning check and load assembly manually by the name (from the application context).
Alternatives
Fully drop references to
MongoDB.Driver.Core.Extensions.DiagnosticSources
and implement instrumentation as a bytecode (we need it already partially to enable instrumentation). It can be done before release or as the follow up.Revert changes from: MongoDB.Driver.Core - support only 2.28.0+ #3604 and GraphQL support for 8.0+ #3615. It might be not the best option if we check download statistics from the last 6 weeks.
Implement instrumentation on the MongoDB side, but it not short term solution.
Tests
Tested locally, as tests for MongoDB on .NET Framework are not executed in the pipeline.
Checklist
[ ]CHANGELOG.md
is updated.[ ] Documentation is updated.Newfeatures are covered by tests - as a part of release process.