Skip to content

Conversation

@mserranom
Copy link
Contributor

Description

This PR disables telemetry collection in mongosh by adding a global mongo config file. I'm using forceDisableTelemetry to override any local configuration.

Tests:

overleaf [direct: primary] sharelatex> config.set("enableTelemetry", true)
MongoshRuntimeError: Cannot modify telemetry settings while 'forceDisableTelemetry' is set to true
overleaf [direct: primary] sharelatex> disableTelemetry()
MongoshRuntimeError: Cannot modify telemetry settings while 'forceDisableTelemetry' is set to true
overleaf [direct: primary] sharelatex> enableTelemetry()
MongoshRuntimeError: Cannot modify telemetry settings while 'forceDisableTelemetry' is set to true

Contributor Agreement

Copy link
Member

@das7pad das7pad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, not tested

@das7pad das7pad removed their assignment Feb 11, 2026
@mlevans0
Copy link
Collaborator

As per our Slack conversation. It looks like the forceDisableTelemetry global setting is being overwritten by the the local setting (docs) which is true by default. To stick with the current approach users would need to:

  • Set forceDisableTelemetry: false
  • Open a shell and run config.set("enableTelemetry", false)
  • Set forceDisableTelemetry: true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants