dipdup
dipdup copied to clipboard
Make stacktraces more informative
Context: We often have bug reports from DipDup users containing log tail and it is not possible to get any additional information for troubleshooting.
Proposal: In order to get the most out of the log, it is proposed to improve stacktrace formatting and to enrich it with additional stack data:
- leave only frames related to the DipDup execution (skip system calls)
- Make the representation more compact (single line per frame, omit unnecessary info, leave only minimum necessary information for debugging)
- add locals, allow to filter out sensitive info (optional, bonus feature)
- improve formatting of DipDup models (implement repr, also bonus feature)
How you can test/showcase:
- force database issue by shutting down the pg instance
- implement a trivial demo indexer that raises an exception in the handler
- same, but do some illegal db actions, e.g. altering non-existing item, break constraints
- any other issues you can think of
Follow-up discussion:
- how to troubleshoot external crash reports
- what should an ideal crash report include so that one can figure out the cause of an outage and reproduce
- which existing tooling can be used to improve this process