Package brave.mongodb

Class MongoDBTracing

java.lang.Object
brave.mongodb.MongoDBTracing

public final class MongoDBTracing
extends Object
Use this class to decorate your MongoDB client and enable Tracing.

To use it, call .addCommandListener(MongoDBTracing.create(tracing).commandListener()) on the MongoClientOptions or MongoClientSettings object that is used to create the MongoClient to be instrumented. As of now, this instrumentation can only be used with the synchronous MongoDB driver. Do not use it with the asynchronous or reactive drivers as tracing data will be incorrect.