Add opcounters.aggregate counter

XMLWordPrintableJSON

    • Query Integration
    • Minor Change
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Overview

      Introduce a new opcounters.aggregates metric that tracks top-level aggregate command invocations as their own exclusive counter, replacing the previous behavior where aggregate incremented opcounters.queries. The two counters are now fully mutually exclusive: an aggregate call increments only aggregates, and a find call increments only queries. Neither increments opcounters.commands.

      Scope of Work

      • src/mongo/db/stats/opcounters.h/.cpp — Add gotAggregate() method and aggregate counter field
      • Shard role service entry point and mongos strategy — Call gotAggregate() when processing aggregate commands

      Technical Notes

      • appears in OTel output, and also in serverStatus.opcounters

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

              Created:
              Updated: