Skip to content

Commit 31caab9

Browse files
(DOCSP-33865): Security clarifications to queryStats (#5132)
* (DOCSP-33865): Updates to queryStats * style guide * external review
1 parent 1b1bcc9 commit 31caab9

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

source/reference/operator/aggregation/queryStats.txt

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -165,9 +165,18 @@ on the following data:
165165

166166
- Database names
167167

168-
``$queryStats`` **does not** apply the hash function to MQL keywords
169-
such as operator names (for example, ``$gte``), or parameter names (such
170-
as the ``partitionBy`` parameter in :pipeline:`$setWindowFields`).
168+
``$queryStats`` **does not** apply the HMAC transformation to the
169+
following data:
170+
171+
- MQL keywords such as operator names (for example, ``$gte``).
172+
173+
- Parameter names such as the ``partitionBy`` parameter in
174+
:pipeline:`$setWindowFields`.
175+
176+
- Field values. ``$queryStats`` normalizes field values in a query to
177+
their data types (such as number or string) when the query is
178+
recorded. ``$queryStats`` never stores field values that contain user
179+
data.
171180

172181
For an example of transformed output, see
173182
:ref:`queryStats-example-transformed`.
@@ -923,7 +932,8 @@ MongoDB Atlas Data Collection
923932

924933
MongoDB Atlas periodically uses ``$queryStats`` to collect anonymized
925934
data about your queries, which helps improve MongoDB products. Your data
926-
may also be used to make feature suggestions based on usage.
935+
may also be used to make feature suggestions based on usage. MongoDB
936+
retains the data it collects with ``$queryStats`` for four years.
927937

928938
When Atlas runs ``$queryStats`` on your deployment, it uses a unique
929939
HMAC key per Atlas organization to transform your data and avoid

0 commit comments

Comments
 (0)