The $queryStats aggregation stage will expose new metrics for keysExamined and others. No changes will be made to existing metrics returned.
Description of Linked Ticket
Summary
Add support for telemetry metrics like 'keysExamined' which must be collected on nodes that execute queries against the storage layer.
Motivation
Query execution metrics like number of index keys scanned are important for understanding query performance and index quality for a given workload. These metrics can only be measured on the data-bearing nodes where a query is executed against the storage layer.
In replica sets and single-shard deployments, these metrics could be collected identically to the router metrics that were added in PM-2885. In more complex multi-shard topologies, however, there needs to be a way to correlate router-collected metrics with data node-collected metrics for a given user query that is resilient to node restarts.
Documentation
Product Description
Scope
Technical Design
Docs Update