Skip to content

Commit 4ef4c33

Browse files
committed
code edits
1 parent 5fa7e28 commit 4ef4c33

File tree

2 files changed

+8
-14
lines changed

2 files changed

+8
-14
lines changed

source/includes/fundamentals/code-snippets/Monitoring.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ private void monitorCommandEvent() {
4242
MongoClient mongoClient = MongoClients.create(settings);
4343
MongoDatabase database = mongoClient.getDatabase(DATABASE);
4444
MongoCollection<Document> collection = database.getCollection(COLLECTION);
45-
// Run some commands to test the timer
45+
// Runs sample find() commands to test the timer
4646
collection.find().first();
4747
collection.find().first();
4848
mongoClient.close();
@@ -61,7 +61,7 @@ private void monitorClusterEvent() {
6161
MongoClient mongoClient = MongoClients.create(settings);
6262
MongoDatabase database = mongoClient.getDatabase(DATABASE);
6363
MongoCollection<Document> collection = database.getCollection(COLLECTION);
64-
// Run a command to trigger a ClusterDescriptionChangedEvent event
64+
// Runs a sample find() command to trigger a ClusterDescriptionChangedEvent event
6565
collection.find().first();
6666
// end monitor-cluster-example
6767
mongoClient.close();
@@ -79,7 +79,7 @@ private void monitorConnectionPoolEvent() {
7979
MongoClient mongoClient = MongoClients.create(settings);
8080
MongoDatabase database = mongoClient.getDatabase(DATABASE);
8181
MongoCollection<Document> collection = database.getCollection(COLLECTION);
82-
// Run a command to trigger connection pool events
82+
// Runs a sample find() command to trigger connection pool events
8383
collection.find().first();
8484
// end monitor-cp-example
8585
/* We do not close this connection in order to prevent the driver from requesting two connections, giving

source/logging-monitoring/monitoring.txt

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,8 @@ The MongoDB Java driver organizes the events it defines into three categories:
5858

5959
The following sections show how to monitor each event category.
6060

61-
To learn more about the events you can monitor, `see the event package of the
62-
MongoDB Java Driver <{+api+}/apidocs/mongodb-driver-core/com/mongodb/event/package-summary.html>`__.
63-
64-
.. fix this link text^
61+
To learn more about the events you can monitor, see the API documentation for `event classes
62+
<{+api+}/apidocs/mongodb-driver-core/com/mongodb/event/package-summary.html>`__.
6563

6664
.. _command-events-java:
6765

@@ -78,9 +76,7 @@ To monitor command events, write a class that implements the
7876

7977
To learn more about MongoDB database commands, see the
8078
:manual:`MongoDB manual entry on database commands </reference/command/>` in the
81-
Server (or MongoDB?) Manual.
82-
83-
.. fix this link ^
79+
Server Manual.
8480

8581
.. note:: Internal Commands
8682

@@ -94,9 +90,8 @@ Server (or MongoDB?) Manual.
9490
As a security measure, the driver redacts the contents of some command events. This
9591
protects the sensitive information contained in these command events. For a
9692
full list of redacted command events, see the
97-
:spec:`MongoDB command logging and monitoring specification </command-logging-and-monitoring/command-logging-and-monitoring.rst#security>`.
98-
99-
.. ^fix this link
93+
:spec:`MongoDB command logging and monitoring specification </command-logging-and-monitoring/command-logging-and-monitoring.md#security>`
94+
in GitHub.
10095

10196
Example
10297
^^^^^^^
@@ -236,7 +231,6 @@ application run faster.
236231
.. Add when page is ready: To learn more about connection pools, see the {+driver-short+}'s
237232
.. :ref:`Connection Pools <connection-pools>` guide.
238233

239-
240234
To monitor connection pool events, write a class that implements the
241235
``ConnectionPoolListener`` interface and register an instance of that class with your
242236
``MongoClient`` instance.

0 commit comments

Comments
 (0)