Docs Home / mongosh / Configure

Configure Telemetry Options配置遥测选项

mongosh collects anonymous aggregated usage data to improve MongoDB products. mongosh collects this information by default, but you can disable this data collection at any time.mongosh集合匿名聚合使用数据以改进MongoDB产品。mongosh默认集合此信息,但您可以随时禁用此数据集合。

Data Tracked by mongoshmongosh跟踪的数据

mongosh tracks the following data:mongosh跟踪以下数据:

  • The type of MongoDB mongosh is connected to. For example, Enterprise Edition or Community Edition.连接的MongoDB mongosh类型。例如,企业版或社区版。
  • The methods run in mongosh. mongosh only tracks the names of the methods, and does not track any arguments supplied to methods.这些方法用蒙古语运行。mongosh只跟踪方法的名称,不跟踪提供给方法的任何参数。
  • Whether users run scripts with mongosh.用户是否使用mongosh运行脚本。
  • Errors.错误。

mongosh does not track:mongosh不跟踪:

  • IP addresses, hostnames, usernames, or credentials.IP地址、主机名、用户名或凭据。
  • Queries run in mongosh.查询在mongosh中运行。
  • Any data stored in your MongoDB deployment.存储在MongoDB部署中的任何数据。
  • Personal identifiable information.个人身份信息。

For more information, see MongoDB's Privacy Policy.有关更多信息,请参阅MongoDB的隐私政策

Toggle Telemetry Collection切换遥测数据采集

Use the following methods in mongosh to toggle telemetry data collection.mongosh中使用以下方法切换遥测数据采集。

disableTelemetry()

Disable telemetry for mongosh.禁用mongosh的遥测功能。

disableTelemetry()

The command response confirms that telemetry is disabled:命令响应确认遥测已禁用:

Telemetry is now disabled.

Tip

You can also disable telemetry at startup by using the --eval startup option.您还可以在启动时使用--eval选项禁用遥测。

The following command starts mongosh with telemetry disabled:以下命令在禁用遥测的情况下启动mongosh

mongosh --nodb --eval "disableTelemetry()"
enableTelemetry()

Enable telemetry for mongosh.

enableTelemetry()

The command response confirms that telemetry is enabled:命令响应确认遥测已启用:

Telemetry is now enabled.