Closed j-musca closed 3 months ago
I looked into it, and basically this is a request to support mongodb-driver-core (5.x).
It is clear that mongo intentionally broke API to create the new driver infrastructure, even if some things are similar. For example, the constructors of the final classes representing events also broke.
Rather than use reflection and also hacks to get the unit tests to compile again, I suggest making a new module called mongodb-driver-core and addressing all the drift without use of reflection.
Make sure when doing so, the RATIONALE and README.md are adjusted for drift also.
actually I got this
https://github.com/openzipkin/brave/pull/1431 should fix it. I figured a way to keep everything in the same module, which is also nicer as it contains the eventuality of CVEs in the v3 version
Describe the Bug
TraceMongoCommandListener calls connectionDescription.getServerAddress().getSocketAddress(). This throws a MethodNotFound exception in combination with the latest MongoDB client versions 5.x.
Steps to Reproduce
Create a dummy project with brave MongoDB instrumentation + MongoDB client version 5.x and try to compile it.
Expected Behaviour
The recommendation is to use "new InetSocketAddress(InetAddress.getByName(host), port);" to get the address.