Once the OperationLatencyHistogram supports tracking transactions latency, we need to update the appropriate histogram counters whenever a transaction commits or aborts. We can do this by calling Top::incrementGlobalLatencyStats on abort or commit, with the appropriate arguments to indicate this operation is a transaction, and the total duration of the transaction. The total transaction duration should be available by using the transaction startTime tracked in TxnStats on that transaction's session.
Additionally, we will also need to update the OperationLatencyHistogram::append method so that it includes transaction latencies in a sub-document with key "transactions". We want the final serverStatus output to include the transaction latencies in the same format as the current read/write/command latencies, but in an opLatencies.transactions section.