Capture traces when we encounter fatal errors

When we encounter fatal errors, capture the transaction trace
and write it to disk. This will help us root cause
unexpected failures faster.

Bug: 311954600
Test: presubmit
Change-Id: I19aabc20b75531bc22ed540096def111647b9afb
1 file changed