Skip to content

Commit bbeaa98

Browse files
committed
NR feedback
1 parent 4f26b7c commit bbeaa98

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

source/includes/monitoring/monitoring.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,19 @@ class MyCommandListener(CommandListener):
88
def succeeded(self, event: CommandSucceededEvent):
99
print(f"Command {event.command_name} succeeded")
1010

11-
# Other event method implementations here
11+
# Include other event method implementations here
1212

1313
class MyServerListener(ServerListener):
1414
def heartbeat_started(self, event: ServerHeartbeatStartedEvent):
1515
print(f"Heartbeat started on server with id: {event.connection_id}")
1616

17-
# Other event method implementations here
17+
# Include other event method implementations here
1818

1919
class MyPoolListener(ConnectionPoolListener):
2020
def connection_created(self, event: ConnectionCreatedEvent):
2121
print(f"Connection {event.connection_id} created")
2222

23-
# Other event method implementations here
23+
# Include other event method implementations here
2424

2525
listeners = [MyCommandListener(), MyServerListener(), MyPoolListener()]
2626
client = MongoClient("<connection URI>", event_listeners=listeners)

source/monitoring.txt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ listen for driver events to monitor your application.
3131
.. note:: Event Logging
3232

3333
This page explains how to monitor your application in code. To learn how to record
34-
this information to an external log, see :ref:`Logging. <pymongo-logging>`
34+
this information to an external log, see the :ref:`pymongo-logging` guide.
3535

3636
Event Types
3737
-----------
@@ -45,9 +45,9 @@ The following table describes the types of events that the driver emits:
4545

4646
* - Event Type
4747
- Description
48-
* - Command Events
48+
* - Command events
4949
- Events related to MongoDB database commands, such as ``find``, ``insert``,
50-
``delete``, and ``count``. To learn how to use the {+driver-short+} to run a
50+
``delete``, and ``count``. To learn how to use {+driver-short+} to run a
5151
database command, see :ref:`<pymongo-run-command>`. For more information about
5252
MongoDB database commands, see :manual:`Database Commands </reference/command/>`
5353
in the {+mdb-server+} manual.
@@ -56,10 +56,10 @@ The following table describes the types of events that the driver emits:
5656
command events. This protects the sensitive information contained in these command
5757
events.
5858

59-
* - Server Discovery and Monitoring (SDAM) Events
59+
* - Server Discovery and Monitoring (SDAM) events
6060
- Events related to changes in the state of the MongoDB deployment.
6161

62-
* - Connection Pool Events
62+
* - Connection Pool events
6363
- Events related to the connection pool held by the driver.
6464

6565
For a complete list of events the driver emits, see the
@@ -69,7 +69,7 @@ Listening for Events
6969
--------------------
7070

7171
To monitor an event, you must pass an event listener to your application's ``MongoClient``.
72-
The following steps describe how to monitor your application using an event listener:
72+
The following steps describe how to monitor your application by using an event listener:
7373

7474
1. Create a class that inherits from one of the event listener base classes
7575
provided by {+driver-short+}. The base class you choose depends on the type of event
@@ -94,5 +94,5 @@ API Documentation
9494
To learn more about the methods and classes used to monitor events in the driver, see the
9595
following API documentation:
9696

97-
- `pymongo.monitoring <{+api-root+}pymongo/monitoring.html>`__
97+
- `monitoring <{+api-root+}pymongo/monitoring.html>`__
9898
- `MongoClient <{+api-root+}pymongo/mongo_client.html#pymongo.mongo_client.MongoClient>`__

0 commit comments

Comments
 (0)