refactor: extract into function
Use the waiting txns list as metric.
more metrics
dump waiting txns on get requests