Query Stats not being recorded on shard servers

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Critical - P2
    • None
    • Affects Version/s: None
    • Component/s: None
    • Query Integration
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      As of CLOUDP-304239 we are collecting query stats from shards to allow drill-down. In SERVER-113892 we started testing this and I realized that we are not including most query shapes because of this logic:

      query_stats.cpp
          // Don't record queries from internal clients.
          if (opCtx->getClient()->isInternalClient()) {
              LOGV2_DEBUG(11389200,
                          5,
                          "not collecting query stats for this internal request",
                          "collection"_attr = collection);
              return;
          }
      

      That will include mongos -> mongod traffic, since mongos will identify as an internal client.

            Assignee:
            Unassigned
            Reporter:
            Charlie Swanson
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: