Another approach is to record at a lower level and then reconstruct the series of events, eg.g. https://engineering.fb.com/2021/04/27/developer-tools/revers...