File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,16 @@ application has multiple `MongoClient` instances connected to the same MongoDB s
3333- ` waitQueueSize ` : the current size of the wait queue for a connection from this pool
3434- ` checkedOutCount ` : the current count of connections that are currently in use
3535
36+ JMX connection pool monitoring is disabled by default. To enable it add a ` com.mongodb.management.JMXConnectionPoolListener ` instance via
37+ ` MongoClientSettings ` :
38+
39+ ``` java
40+ MongoClientSettings settings =
41+ MongoClientSettings . builder()
42+ .applyToConnectionPoolSettings(builder - > builder. addConnectionPoolListener(new JMXConnectionPoolListener ()))
43+ .build();
44+ ```
45+
3646# Command Monitoring
3747
3848The driver implements the
Original file line number Diff line number Diff line change @@ -33,6 +33,19 @@ application has multiple `MongoClient` instances connected to the same MongoDB s
3333- ` waitQueueSize ` : the current size of the wait queue for a connection from this pool
3434- ` checkedOutCount ` : the current count of connections that are currently in use
3535
36+
37+ JMX connection pool monitoring is disabled by default. To enable it add a ` com.mongodb.management.JMXConnectionPoolListener ` instance via
38+ ` MongoClientOptions ` :
39+
40+ ``` java
41+ MongoClientOptions options =
42+ MongoClientOptions . builder()
43+ .addConnectionPoolListener(new JMXConnectionPoolListener ())
44+ .build();
45+
46+
47+ ```
48+
3649# Command Monitoring
3750
3851The driver implements the
You can’t perform that action at this time.
0 commit comments