Tracking All MongoDB Read Operations Without Performance Impact (Free Solution)

Here’s a well-framed question you can post to the MongoDB community forums or Stack Overflow:

Tracking All MongoDB Read Operations Without Performance Impact (Free Solution)

I’m trying to implement a system to track all read-only operations on our MongoDB deployment with the following constraints:

##Requirements:

  • Need to track all read operations (find, aggregate, etc.) hitting our MongoDB server
  • Solution must be free (no MongoDB Enterprise/Atlas features)
  • Minimal performance impact on production workload
  • Complete coverage of operations from all clients/applications

What I’ve already tried:

  1. system.profiler: Too much performance impact when tracking all operations
  2. currentOp(): Missing many read operations due to their short lifecycle
  3. MongoDB logs: Difficult to parse efficiently and adds I/O overhead
  4. Change streams: Don’t capture read-only operations
  5. Driver command monitoring: Only captures operations from the specific application instance where it’s implemented

Has anyone successfully implemented a solution for comprehensive read operation tracking in a similar environment? What approach would you recommend given my constraints?