Skip to content

Commit e52dbb2

Browse files
committed
PYTHON-5993 Clarify the operation_telemetry docstrings
Carries the wording from PR 1 forward and corrects it for the behavior this branch adds: both cursor types pass a span now, and what one covers is a single caller-driven getMore rather than a run of them.
1 parent 322ad94 commit e52dbb2

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

pymongo/asynchronous/mongo_client.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1912,7 +1912,8 @@ async def _run_operation(
19121912
:param address: Optional address when sending a message
19131913
to a specific server, used for getMore.
19141914
:param operation_telemetry: The calling cursor's operation span, or None,
1915-
so this send's command spans nest under it.
1915+
so this send's command spans nest under it. Covers one caller-driven
1916+
getMore, or a whole API call that drains the cursor itself.
19161917
:param reuse_current_span: Create no operation span at all and leave the
19171918
ambient span in place as the parent for this operation's command
19181919
spans. Mutually exclusive with ``operation_telemetry``. Defaults to

pymongo/synchronous/mongo_client.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1907,7 +1907,8 @@ def _run_operation(
19071907
:param address: Optional address when sending a message
19081908
to a specific server, used for getMore.
19091909
:param operation_telemetry: The calling cursor's operation span, or None,
1910-
so this send's command spans nest under it.
1910+
so this send's command spans nest under it. Covers one caller-driven
1911+
getMore, or a whole API call that drains the cursor itself.
19111912
:param reuse_current_span: Create no operation span at all and leave the
19121913
ambient span in place as the parent for this operation's command
19131914
spans. Mutually exclusive with ``operation_telemetry``. Defaults to

0 commit comments

Comments
 (0)