As per the scope document, track how long a transaction has been active (executing a client command) and inactive (waiting for a client command) and include both in the slow transaction log for all transactions.
This was spun off from SERVER-40985.
Investigate changes in SERVER-41376: Track time transactions on mongos are active and inactive and include in slow txn logging
Log metrics on mongos when slow transaction completes
Add currentOpen, currentActive, and currentInactive to mongos transactions serverStatus output