1. Especially long queries are truncated in the mongod log file.
2. Parsing the shape of queries from a log line is difficult.
I propose two improvements.
1. Always print a hash of the query shape. This eliminates the issue of #1 as we can now group queries by hash. This also will speed log analysis, eliminating the need to parse the query.
2. Add an administrative command to return a query shape from a hash in the plan cache.
Not only would this speed analysis of slow queries but would be helpful with log redaction. The analysis can be performed on just the hash with the associated metadata and the customer can investigate the actual queries independently.