boltlabs-inc / zeekoe

Zero-knowledge layer-2 payment channels
MIT License
24 stars 1 forks source link

Tracing #349

Closed gijsvl closed 2 years ago

gijsvl commented 2 years ago
marsella commented 2 years ago

Thank you, this looks great!

Comment: I recall being told that the tracing crate had features that could help reduce the volume of similar context calls throughout the code by, I think, encoding the errors at the called function level, rather than the caller. For example, every time we update the database, there's a context like "failed to update status for \<channel id> to \<new status>"

e.g. https://github.com/boltlabs-inc/zeekoe/blob/main/src/bin/customer/establish.rs#L247

I am not sure how this works because the new status is kind of complexly snuck into the parameters for the function. But is that the kind of thing you could do with spans?