ExportXMLWordPrintableJSON

    • Type: Task
    • Resolution: Done
    • Priority: Major - P3
    • vNext
    • Affects Version/s: None
    • Component/s: None
    • None
    • Not Needed
    • Developer Tools

      Today, according to scope, mongosh counts a session as interactive whenever there's no --eval and no file, so piped input (mongosh < script.js, echo … | mongosh) is tracked. Looks like ~98% of sessions come from container healthchecks, driving most of the WAF cost and alert noise. Change this behavior and collect telemetry only if the agent env var is set, or mongosh enters the REPL with process.stdin.isTTY === true. Leave mongosh's own interactive behaviour and the is_interactive field unchanged.

      Scripts fed through stdin (mongosh < script.js, cat script.js | mongosh, heredocs) will be no longer tracked. Humans who type without a TTY (eg docker exec without -t) won't be tracked as well (accepted trade-off).

      See Slack thread for more details: https://mongodb.slack.com/archives/CJ2CBBY86/p1791467116716689

            Assignee:
            Alena Khineika
            Reporter:
            Alena Khineika
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: