Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-53859

Add queryHash to the mongos slow query logs

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 5.1.0-rc0
    • Affects Version/s: 4.4.1
    • Component/s: Logging
    • None
    • Fully Compatible
    • Query Execution 2021-05-31, Query Execution 2021-06-14, Query Execution 2021-06-28, Query Execution 2021-07-12

      `queryHash` field introduced in slow query logs in v4.2 is available only in `mongod` logs and not in `mongos` logs. The documentation does not have any mention of relevant behaviour. Is this expected or requires any configuration change? 

      Sample mongos slow query log:

      {"t":{"$date":"2020-12-31T02:19:33.680+00:00"},"s":"I",  "c":"COMMAND",  "id":51803,   "ctx":"conn128","msg":"Slow query","attr":{"type":"command","ns":"xxxx.companyPriority","command":{"find":"companyPriority","filter":{"_id":{"$in":[{"$oid":"5319df10e4b0f7e16602a313"}]}},"$db":"xxxx","$clusterTime":{"clusterTime":{"$timestamp":{"t":1609381171,"i":2}},"signature":{"hash":{"$binary":{"base64":"C2cNRe4vAhiBs97T6VYXIYYU1Ck=","subType":"0"}},"keyId":6877905033757720578}},"lsid":{"id":{"$uuid":"ba72a15f-2568-43e9-8c9a-abd7bd2aa6be"}}},"nShards":1,"cursorExhausted":true,"numYields":0,"nreturned":1,"reslen":278,"protocol":"op_msg","durationMillis":2007}}
      

            Assignee:
            mickey.winters@mongodb.com Mickey Winters
            Reporter:
            ankit.shah.sm@gmail.com Ankit Shah
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: