Skip to content

Commit d2b111c

Browse files
committed
NR feedback
1 parent 19dfc01 commit d2b111c

File tree

1 file changed

+25
-35
lines changed

1 file changed

+25
-35
lines changed

source/monitoring.txt

Lines changed: 25 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ Monitoring is the process of getting information about the activities a running
1818
program performs for use in an application or an application performance
1919
management library.
2020

21-
Monitoring the {+driver-short+} to monitor cluster, driver command, and
21+
You can use the {+driver-short+} to monitor cluster, driver command, and
2222
connection pool events. These features help you make informed decisions when
2323
designing and debugging your application.
2424

25-
In this guide you will learn how to perform these tasks:
25+
This guide shows how to perform the following tasks:
2626

2727
- :ref:`Monitor specific events by using the {+driver-short+} <monitoring-monitor-events>`
2828
- :ref:`Monitor connection pool events with Java Management Extensions (JMX) and JConsole <monitoring-jmx>`
@@ -56,7 +56,7 @@ The {+driver-short+} organizes the events it defines into three categories:
5656
- Connection Pool events
5757

5858
The following sections show how to monitor each event category. For a full list of the events you can monitor,
59-
`see the event package of the {+language+} driver
59+
`see the Java event package
6060
<{+core-api+}/com/mongodb/event/package-summary.html>`__.
6161

6262
.. _command-events-kotlin:
@@ -72,8 +72,9 @@ To monitor command events, create a class that implements the
7272
``CommandListener`` interface and register an instance of that class with your
7373
``MongoClient`` instance.
7474

75-
For more information on MongoDB database commands, see the
76-
:manual:`MongoDB manual entry on database commands </reference/command/>`.
75+
For more information on MongoDB database commands, see the
76+
:manual:`MongoDB manual entry on database commands </reference/command/>`in
77+
the {+mdb-server+} manual.
7778

7879
.. note:: Internal Commands
7980

@@ -100,7 +101,7 @@ To make a counter, follow these steps:
100101

101102
#. Make a class with counter functionality that implements the ``CommandListener`` interface.
102103
#. Add an instance of the new class to a ``MongoClientSettings`` object.
103-
#. Configure you ``MongoClient`` instance with the ``MongoClientSettings`` object.
104+
#. Configure your ``MongoClient`` instance with the ``MongoClientSettings`` object.
104105

105106
The following code implements these steps:
106107

@@ -138,9 +139,9 @@ in the state of the MongoDB instance or cluster you have connected the driver to
138139
The driver defines nine SDAM events and provides the following listener
139140
interfaces, which listen for three SDAM events each:
140141

141-
- ``ClusterListener``: topology-related events
142-
- ``ServerListener``: events related to ``mongod`` or ``mongos`` processes
143-
- ``ServerMonitorListener``: heartbeat related events
142+
- ``ClusterListener``: Listens for topology-related events
143+
- ``ServerListener``: Listens for events related to ``mongod`` or ``mongos`` processes
144+
- ``ServerMonitorListener``: Listens for heartbeat-related events
144145

145146
To monitor a type of SDAM event, create a class that implements one of the three
146147
preceding interfaces and register an instance of that class with your
@@ -151,12 +152,12 @@ For a detailed description of each SDAM event, see the :spec:`MongoDB SDAM monit
151152
Example
152153
^^^^^^^
153154

154-
This example shows how to make a listener class that prints a message that lets
155-
you know if the driver can write to your MongoDB instance.
155+
This example shows how to make a listener class that prints a message about the write
156+
availability of your MongoDB instance.
156157

157-
To make an event that reports write status:
158+
To make an event that reports write status, perform the following tasks:
158159

159-
#. Make a class that tracks and checks cluster description changes, and
160+
#. Make a class that tracks cluster description changes, and
160161
implements the ``CommandListener`` interface.
161162
#. Add an instance of the new class to a ``MongoClientSettings`` object.
162163
#. Configure your ``MongoClient`` instance with the ``MongoClientSettings`` object.
@@ -203,7 +204,7 @@ Example
203204
This example shows how to make a listener class that prints a message each time
204205
you check out a connection from your connection pool.
205206

206-
To make an event that reports connection checkouts:
207+
To make an event that reports connection checkouts, perform the following tasks:
207208

208209
#. Make a class that tracks checkouts and implements the ``CommandListener`` interface.
209210
#. Add an instance of the new class to a ``MongoClientSettings`` object.
@@ -328,7 +329,7 @@ navigate to JConsole and inspect your connection pools.
328329

329330
Navigate to JConsole to see your connection pools...
330331

331-
Once you have started your server, open JConsole in your terminal using the
332+
Once you have started your server, open JConsole in your terminal by using the
332333
following command:
333334

334335
.. code-block:: shell
@@ -345,8 +346,8 @@ Once JConsole is open, perform the following actions in the GUI:
345346
When you no longer want to inspect your connection pools in JConsole, do the
346347
following:
347348

348-
#. Exit JConsole by closing the JConsole window
349-
#. Stop the program running by the preceding code snippet
349+
#. Exit JConsole by closing the JConsole window.
350+
#. Stop the program running by the preceding code snippet.
350351

351352
For more information on JMX and JConsole, see the following resources from
352353
Oracle:
@@ -367,25 +368,12 @@ tracks requests as they propagate throughout different services in a
367368
service-oriented architecture.
368369

369370
If you use the driver in a `Spring Cloud <https://spring.io/projects/spring-cloud>`__
370-
application, use
371-
`Spring Cloud Sleuth <https://spring.io/projects/spring-cloud-sleuth>`__ to
372-
include MongoDB event data in the
373-
`Zipkin <https://zipkin.io/>`__ distributed tracing system.
371+
application, use to include MongoDB event data in the `Zipkin
372+
<https://zipkin.io/>`__ distributed tracing system.
374373

375374
If you do not use Spring Cloud or want to include driver event data in a distributed
376375
tracing system other than Zipkin, you must write a command event listener that
377-
manages `spans
378-
<https://docs.spring.io/spring-cloud-sleuth/docs/current-SNAPSHOT/reference/html/getting-started.html#getting-started-terminology>`__
379-
for your desired distributed tracing system. To see an implementation of such a
380-
listener, see the Java source code for the :github:`TraceMongoCommandListener <spring-cloud/spring-cloud-sleuth/blob/eb01d5952b2e736970efbe3fc7e9784d119eeae9/spring-cloud-sleuth-instrumentation/src/main/java/org/springframework/cloud/sleuth/instrument/mongodb/TraceMongoCommandListener.java>`
381-
class in the Spring Cloud Sleuth source code.
382-
383-
To learn more about Spring Cloud Sleuth, see
384-
`Getting Started <https://docs.spring.io/spring-cloud-sleuth/docs/current-SNAPSHOT/reference/html/getting-started.html>`__
385-
in the Spring Cloud Sleuth documentation.
386-
387-
To view a detailed description of a distributed tracing system, see
388-
`Dapper <https://research.google/pubs/pub36356/>`__ from Google Research.
376+
manages **spans** for your desired distributed tracing system.
389377

390378
.. tip::
391379

@@ -395,7 +383,9 @@ To view a detailed description of a distributed tracing system, see
395383
- `Spring Cloud <https://spring.io/projects/spring-cloud>`__
396384
- `Spring Cloud Sleuth <https://spring.io/projects/spring-cloud-sleuth>`__
397385
- `spans <https://docs.spring.io/spring-cloud-sleuth/docs/current-SNAPSHOT/reference/html/getting-started.html#getting-started-terminology>`__
398-
- :github:`TraceMongoCommandListener <spring-cloud/spring-cloud-sleuth/blob/eb01d5952b2e736970efbe3fc7e9784d119eeae9/spring-cloud-sleuth-instrumentation/src/main/java/org/springframework/cloud/sleuth/instrument/mongodb/TraceMongoCommandListener.java>`
386+
- :github:`TraceMongoCommandListener <spring-cloud/spring-cloud-sleuth/blob/eb01d5952b2e736970efbe3fc7e9784d119eeae9/spring-cloud-sleuth-instrumentation/src/main/java/org/springframework/cloud/sleuth/instrument/mongodb/TraceMongoCommandListener.java>` : An
387+
implementation of an event listen than manages spans
399388
- `Getting Started <https://docs.spring.io/spring-cloud-sleuth/docs/current-SNAPSHOT/reference/html/getting-started.html>`__
400389
- `Zipkin <https://zipkin.io/>`__
401-
- `Dapper <https://research.google/pubs/pub36356/>`__
390+
- `Dapper <https://research.google/pubs/pub36356/>`__ : A detailed
391+
description of a distributed tracing system from Google Research

0 commit comments

Comments
 (0)