Skip to content

Commit f361e5a

Browse files
(DOCSP-19437): mongosh telemetry (#169)
* (DOCSP-19437): mongosh telemetry * Add link to privacy policy * Update source/telemetry.txt Co-authored-by: Massimiliano Marcon <[email protected]> * wording tweak Co-authored-by: Massimiliano Marcon <[email protected]>
1 parent a4325b1 commit f361e5a

File tree

4 files changed

+120
-2
lines changed

4 files changed

+120
-2
lines changed

source/includes/fact-connect-prereqs.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ To use the |mdb-shell|, you must have a MongoDB deployment to connect
22
to.
33

44
- For a free cloud-hosted deployment, you can use
5-
`MongoDB Atlas <https://www.mongodb.com/cloud/atlas?tck=docs_vsce>`__.
5+
`MongoDB Atlas <https://www.mongodb.com/cloud/atlas?tck=docs_mongosh>`__.
66

77
- To learn how to run a local MongoDB deployment, see
88
:manual:`Install MongoDB </installation/>`.

source/reference/methods.txt

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1322,6 +1322,32 @@ Sharding Methods
13221322

13231323
- Associates a range of shard keys with a zone. Supports configuring
13241324
zones in sharded clusters.
1325+
1326+
Telemetry Methods
1327+
-----------------
1328+
1329+
These methods configure whether ``mongosh`` tracks anonymous telemetry
1330+
data. Telemetry is enabled by default.
1331+
1332+
For more information on what data ``mongosh`` tracks with
1333+
telemetry, see :ref:`telemetry`.
1334+
1335+
.. list-table::
1336+
:widths: 30 70
1337+
:header-rows: 1
1338+
1339+
* - Method
1340+
1341+
- Description
1342+
1343+
* - :method:`disableTelemetry()`
1344+
1345+
- Disable telemetry for ``mongosh``.
1346+
1347+
* - :method:`enableTelemetry()`
1348+
1349+
- Enable telemetry for ``mongosh``.
1350+
13251351

13261352
Transaction Methods
13271353
-------------------

source/run-commands.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,4 +167,4 @@ with ``Ctrl + L`` and ``console.clear()``.
167167

168168
/crud
169169
/run-agg-pipelines
170-
170+
/telemetry

source/telemetry.txt

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
.. _telemetry:
2+
3+
===========================
4+
Configure Telemetry Options
5+
===========================
6+
7+
.. default-domain:: mongodb
8+
9+
.. contents:: On this page
10+
:local:
11+
:backlinks: none
12+
:depth: 1
13+
:class: singlecol
14+
15+
``mongosh`` collects anonymous aggregated usage data to improve
16+
MongoDB products. ``mongosh`` collects this information by default, but
17+
you can disable this data collection at any time.
18+
19+
What Kind of Data ``mongosh`` Tracks
20+
------------------------------------
21+
22+
``mongosh`` tracks the following data:
23+
24+
- The type of MongoDB ``mongosh`` is connected to. For example,
25+
Enterprise Edition, Community Edition, or Atlas Data Lake.
26+
27+
- The methods run in ``mongosh``. ``mongosh`` only tracks the names of
28+
the methods, and does not track any arguments supplied to methods.
29+
30+
- Whether users run scripts with ``mongosh``.
31+
32+
- Errors.
33+
34+
``mongosh`` *does not* track:
35+
36+
- IP addresses, hostnames, usernames, or credentials.
37+
38+
- Queries run in ``mongosh``.
39+
40+
- Any data stored in your MongoDB deployment.
41+
42+
- Personal identifiable information.
43+
44+
For more information, see MongoDB's `Privacy Policy
45+
<https://www.mongodb.com/legal/privacy-policy?tck=docs_mongosh>`__.
46+
47+
Toggle Telemetry Collection
48+
---------------------------
49+
50+
Use the following methods in ``mongosh`` to toggle telemetry data
51+
collection.
52+
53+
.. method:: disableTelemetry()
54+
55+
Disable telemetry for ``mongosh``.
56+
57+
.. code-block:: javascript
58+
59+
disableTelemetry()
60+
61+
The command response confirms that telemetry is disabled:
62+
63+
.. code-block:: javascript
64+
:copyable: false
65+
66+
Telemetry is now disabled.
67+
68+
.. tip::
69+
70+
You can also disable telemetry at startup by using the
71+
:option:`--eval <--eval>` startup option.
72+
73+
The following command starts ``mongosh`` with telemetry disabled:
74+
75+
.. code-block:: javascript
76+
77+
mongosh --nodb --eval "disableTelemetry()"
78+
79+
.. method:: enableTelemetry()
80+
81+
Enable telemetry for ``mongosh``.
82+
83+
.. code-block:: javascript
84+
85+
enableTelemetry()
86+
87+
The command response confirms that telemetry is enabled:
88+
89+
.. code-block:: javascript
90+
:copyable: false
91+
92+
Telemetry is now enabled.

0 commit comments

Comments
 (0)