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 thecom.mongodb.MongoClientOptionsorMongoClientSettingsobject that is used to create theMongoClientto 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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMongoDBTracing.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.mongodb.event.CommandListenercommandListener()static MongoDBTracingcreate(brave.Tracing tracing)static MongoDBTracing.BuildernewBuilder(brave.Tracing tracing)
-
-
-
Method Detail
-
create
public static MongoDBTracing create(brave.Tracing tracing)
-
newBuilder
public static MongoDBTracing.Builder newBuilder(brave.Tracing tracing)
-
commandListener
public com.mongodb.event.CommandListener commandListener()
-
-