-
Type: Improvement
-
Resolution: Gone away
-
Priority: Major - P3
-
None
-
Affects Version/s: 4.0.5
-
Component/s: API, Monitoring
-
None
I am trying to upgrade some opentracing libraries to use the drivers 4.0.x, in particular this project (https://github.com/opentracing-contrib/java-mongo-driver and this project (https://github.com/opentracing-contrib/java-spring-cloud).
They stopped working because they are based on this code:
if (bean instanceof MongoClient && !(bean instanceof TracingMongoClient)) { final MongoClient client = (MongoClient) bean; final TracingCommandListener commandListener = new TracingCommandListener.Builder(tracer).build(); return new TracingMongoClient(commandListener, client.getServerAddressList(), client.getCredential(), client.getMongoClientOptions()); }
But in the version 4.0.5 the method `client.getServerAddressList()` is not available anymore.
If I have the client, how am I supposed now to retrieve the list of the addresses?
The final goal is being able to have a (new?) MongoClient with a command listener, starting from a "naked" MongoClient. Is there any other way of doing that?