Create a crash reporter
tylerjwatson opened this issue · 0 comments
There is a need for TSAPI to inform us of a crash report. The crash report will be in JSON format and submitted to a TShock endpoint for the purposes of finding server-breaking exploits before they have a chance to ruin the multiplayer experience for everybody. The mechanism is opt-out, but enabled by default, and will generate a 'crash dump' and save it to a subfolder of terraria called crashes
.
Optionally, the crash reporter will include a memory dump of the calling process to help us find bugs in TShock.
Structure
The following information is due to be collected in this first pass:
[ ] OS Information (Type, bit-depth, platform, version)
[ ] Hardware information (Memory capacity, CPU count)
[ ] Software information (TSAPI Heapsize (?), Exception Information, stack info)
[ ] Heap information (core dump)
[ ] Metrics (Number of players, capacity, plugins loaded & versions, mostly TBD)
[ ] Auxiliiary Information (ServerLog.txt, as well as others)
Method
- On exception, a system profile is generated
- Optionally, a memory dump is created
- The payload is zipped, and stored inside
crashes
ascrash_{datetime}.zip
- JSON payload is submitted to webservice
- Crash dump is submitted to webservice