diff --git a/source/server-discovery-and-monitoring/server-discovery-and-monitoring-logging-and-monitoring.rst b/source/server-discovery-and-monitoring/server-discovery-and-monitoring-logging-and-monitoring.rst index c30057b260..305008c878 100644 --- a/source/server-discovery-and-monitoring/server-discovery-and-monitoring-logging-and-monitoring.rst +++ b/source/server-discovery-and-monitoring/server-discovery-and-monitoring-logging-and-monitoring.rst @@ -111,6 +111,12 @@ Initial Server Description ``ServerDescription`` objects MUST be initialized with a default description in an “unknown” state, guaranteeing that the previous description in the events and log messages will never be null. + +Initial Topology Description +---------------------------- + +The first ``TopologyDescriptionChangedEvent`` to be emitted from a monitored Topology MUST set its ``previousDescription`` property to be a ``TopologyDescription`` object in the "unknown" state. + ---------- Events API ---------- @@ -698,6 +704,8 @@ See the `README -- `topologyDescriptionChangedEvent`: Optional object. If present, this object MUST be an empty document as no assertions - are currently supported for +- `topologyDescriptionChangedEvent`: Optional object. Assertions for one [TopologyDescriptionChangedEvent](../server-discovery-and-monitoring/server-discovery-and-monitoring-logging-and-monitoring.rst#events) - fields. + object. + + The structure of this object is as follows: + + - `previousDescription`: Optional Object. A value corresponding to the topology description as it was before the + change that triggered the event. + + - `newDescription` : Optional Object. A value corresponding to the topology description as it is after the change that + triggered the event. + + Test runners SHOULD ignore any other fields than the `previousDescription` and `newDescription` fields. + + The structure of a topology description object (which the `previousDescription` and `newDescription` fields contain + is as follows: + + - `type`: Optional string. The type of the topology in the description. Test runners MUST assert that the type in + the published event matches this value. See + [SDAM: TopologyType](../server-discovery-and-monitoring/server-discovery-and-monitoring.rst#topologytype) for a + list of valid values. + + Test runners SHOULD ignore any other fields present on the `previousDescription` and `newDescription` fields of the + captured `topologyDescriptionChangedEvent`. ##### hasServiceId @@ -3395,6 +3420,12 @@ other specs *and* collating spec changes developed in parallel or during the sam ## Changelog +- 2024-04-15: Note that when `directConnection` is set to true test runners should only provide a single seed. + +- 2024-03-25: **Schema version 1.20.**\ + Add `previousDescription` and `newDescription` assertions to + `topologyDescriptionChangedEvent` when checking events with `expectEvents` + - 2024-03-11: Note that `killAllSessions` should not be executed on Atlas Data Lake - 2024-02-27: Document `onPrimaryTransactionalWrite` fail point, which is used in retryable writes tests.