Tracing Distributed Algorithms Using Replay Clocks