Skip to content

Commit fce8972

Browse files
committed
MW PR fixes 1
1 parent 564dfe9 commit fce8972

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

source/monitoring.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Monitor Your Application
1212
.. /monitoring/command-monitoring
1313
.. /monitoring/connection-monitoring
1414

15-
- :ref:`Cluster Monitoring <php-cluster-monitoring>`: monitor changes
15+
- :ref:`Cluster Monitoring <php-cluster-monitoring>`: Monitor changes
1616
in your cluster configuration
1717

1818
.. TODO - :ref:`Command Monitoring <php-command-monitoring>`: monitor command

source/monitoring/cluster-monitoring.txt

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Overview
2323
This guide shows you how to use the {+php-library+} to monitor topology
2424
events in a MongoDB instance, replica set, or sharded cluster. The
2525
driver creates topology events, also known as Server Discovery and
26-
Monitoring (**SDAM**) events, when there are any changes in the state of the
26+
Monitoring (SDAM) events, when there are any changes in the state of the
2727
MongoDB instance or cluster that you are connected to.
2828

2929
You might use information about topology events in your
@@ -34,14 +34,15 @@ Subscribe to Events
3434
-------------------
3535

3636
You can access details about SDAM events by subscribing to them
37-
in your application. To subscribe to any event, create a class that
37+
in your application. To subscribe to an event, create a class that
3838
implements the ``MongoDB\Driver\Monitoring\SDAMSubscriber`` interface,
3939
then use the ``MongoDB\Client::addSubscriber()`` method to register the
4040
event subscriber with your ``MongoDB\Client`` instance.
4141

42-
The following code creates the ``MySubscriber`` class that implements
43-
``SDAMSubscriber`` to output a message when a ``ServerOpeningEvent`` is
44-
generated by the server:
42+
The following code creates the ``MySubscriber`` class, which implements
43+
the ``SDAMSubscriber`` interface. The class is defined with a method to
44+
output a message when a ``ServerOpeningEvent`` is generated by the
45+
server:
4546

4647
.. literalinclude:: /includes/monitoring/sdam.php
4748
:start-after: start-mysubscriber
@@ -53,12 +54,12 @@ generated by the server:
5354
.. note::
5455

5556
As shown in the preceding code, you must implement all of the methods
56-
of ``SDAMSubscriber``, even for events you are not subscribing to.
57+
of the ``SDAMSubscriber`` interface, even for events you are not subscribing to.
5758
You can implement these methods with empty bodies so that the library
5859
does not generate any messages for these events.
5960

60-
Then, the following code uses the ``addSubscriber()`` method to register
61-
``MySubscriber`` with the client:
61+
Then, use the ``addSubscriber()`` method to register ``MySubscriber``
62+
with the client, as shown in the following code:
6263

6364
.. literalinclude:: /includes/monitoring/sdam.php
6465
:start-after: start-add-sub

0 commit comments

Comments
 (0)