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

Track counters for each command

    • Minor Change
    • Server 2.7.4, Server 2.7.5, Server 2.7.6

      For each command we should track a counter, like opcounters in serverStatus and a gauge for the active/waiting operations by command type.

      This will provide a counter for each command showing the number of times it has been executed and the number of times that the execution has failed. It will also track the number of times any unknown/invalid command is executed.

      This will track writes that are issued via the write command syntax. Due to this the values between the already existing command counter and the new counters may be off.

      Example shell usage:

      > db.serverStatus().metrics.commands
      {
              "<UNKNOWN>" : NumberLong(0),
              "_getUserCacheGeneration" : {
                      "failed" : NumberLong(0),
                      "total" : NumberLong(0)
              },
              "_isSelf" : {
                      "failed" : NumberLong(0),
                      "total" : NumberLong(0)
              },
              "_mergeAuthzCollections" : {
                      "failed" : NumberLong(0),
                      "total" : NumberLong(0)
              },
              "_migrateClone" : {
                      "failed" : NumberLong(0),
                      "total" : NumberLong(0)
              },
              "_recvChunkAbort" : {
                      "failed" : NumberLong(0),
                      "total" : NumberLong(0)
              },
      ...
      }
      

            Assignee:
            david.hows David Hows
            Reporter:
            scotthernandez Scott Hernandez (Inactive)
            Votes:
            2 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: