|
| 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