This would be useful to identify which transactions are slow as well as why some transactions are being rolled back. Transactions can be slow for many reasons, such as a single slow query or many very fast queries for example.
This would have been useful when tracking down issues related to queries which are idle_in_transaction. I can view the history of the metric for time spent in that state but have no way to see which query it was.