-
Type:
Task
-
Resolution: Done
-
Priority:
Major - P3
-
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
- related to
-
MONGOSH-3793 Raise the WAF blocked-spike alarm threshold
-
- Closed
-