Skip to content

Commit 252c26a

Browse files
Backport-queryStats-v7.0 (#8484)
* (DOCSP-26200): queryStats aggregation stage (#4524) * (DOCSP-26200): queryStats aggregation stage * WIP * WIP * WIP * Remove accidental file * add TODO * add missing ref * formatting * WIP * WIP * WIP * wording * WIP * edits * add examples * try to fix table format * add transformed example * remove TODO * more table formatting * add atlas data collection * table formatting * clarity * add more context for data collection * table formatting * wording tweaks * address review comments * formatting * use simplified examples * add input/output * edits * add link to transformed example * spacing * edits * address review comments * fix incomplete sentence * rework transformation section * edits * fix collation link formatting * change wording for output fields * edit glossary * more edits * remove glossary entry * formatting * edits * Address review feedback * wording * review edit * wording * WIP review edits * remove Atlas data collection info * (DOCSP-33347): Re-add Atlas data collection info * typo * minimalism * typo * clarity * remove Atlas data collection info * edits * (DOCSP-33347): Re-add Atlas data collection info * add find queryShape properties * change case * formatting * abstracted > normalized consistency * clarify privilege * address review comments * review edits * (DOCSP-33461): Toggle $queryStats logging (#5329) * initial page setup * WIP * WIP * first draft * formatting * tweak * formatting * wording * add learn more * reorder * add link to transformed output * minimalism * add examples * update toc depth * add output examples * edits * add missing ref * add versions * edit * edit * (DOCSP-33461): Toggle $queryStats logging (#5329) * initial page setup * WIP * WIP * first draft * formatting * tweak * formatting * wording * add learn more * reorder * add link to transformed output * minimalism * add examples * update toc depth * add output examples * edits
1 parent ea845c6 commit 252c26a

15 files changed

+1124
-3
lines changed

snooty.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ toc_landing_pages = [
170170
"/reference/mongodb-wire-protocol/",
171171
"/reference/operator/aggregation-pipeline",
172172
"/reference/operator/aggregation",
173+
"/reference/operator/aggregation/queryStats",
173174
"/reference/operator/query-array",
174175
"/reference/operator/query-bitwise",
175176
"/reference/operator/query-comparison",
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Returns runtime statistics for recorded queries.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
MongoDB records |queryStats| operations in the :atlas:`deployment logs
2+
</mongodb-logs/>`. By default, MongoDB only logs the invocation of
3+
``$queryStats`` operations, not the operation's output. For
4+
``$queryStats`` operations that include the ``transformIdentifiers``
5+
option, you can specify whether the transformed output is included in
6+
the log entry.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.. warning::
2+
3+
The ``$queryStats`` aggregation stage is unsupported and is not
4+
guaranteed to be stable in a future release. Don't build
5+
functionality that relies on a specific output format of this stage,
6+
since the output may change in a future release.

source/includes/extracts-agg-stages.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,12 @@ content: |
159159
160160
See also :pipeline:`$unset` for removing existing fields.
161161
162+
* - :pipeline:`$queryStats`
163+
164+
- .. include:: /includes/aggregation/queryStats/description.rst
165+
166+
.. include:: /includes/aggregation/queryStats/unsupported-warning.rst
167+
162168
* - :pipeline:`$redact`
163169
164170
- Reshapes each document in the stream by restricting the

source/reference/audit-message.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.. _audit-message:
2+
13
===========================
24
System Event Audit Messages
35
===========================

source/reference/method/cursor.allowPartialResults.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.. _cursor-allowPartialResults:
2+
13
============================
24
cursor.allowPartialResults()
35
============================
@@ -30,5 +32,3 @@ syntax:
3032
.. code-block:: javascript
3133

3234
db.collection.find(<query>, <projection>).allowPartialResults()
33-
34-

source/reference/method/cursor.batchSize.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.. _cursor-batchSize:
2+
13
==================
24
cursor.batchSize()
35
==================

source/reference/method/cursor.maxTimeMS.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.. _cursor-maxTimeMS:
2+
13
==================
24
cursor.maxTimeMS()
35
==================
@@ -146,4 +148,3 @@ Examples
146148
.. code-block:: javascript
147149

148150
db.collection.find({description: /August [0-9]+, 1969/}).maxTimeMS(50)
149-

source/reference/method/cursor.noCursorTimeout.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.. _cursor-noCursorTimeout:
2+
13
========================
24
cursor.noCursorTimeout()
35
========================

0 commit comments

Comments
 (0)