Probabilistic Assertions: Crashing When Something Feels Wrong
spiteful.com
spiteful.com
Generally you monitor from your internal network, and then provide some hook for the monitor to get information that’s only accessible from there. (SSH or a limited-access URL, etc.)
Monitoring programs are super-powerful and generally complex. Check them out — it’s a good skill to have when working with production software.
(I also posted this on the article.)
Personally I would never want to debug something like that using a statistical probability that something might have gone wrong. Better to fail gracefully with something like multiple chains so that when a request chain goes down it gets logged, cleaned up, and recreated.
Worst case scenario they get a request timeout warning.
That said, with procedural languages I try to write code that recovers from all reasonable cases and assert the rest.
In that light, it is easy to see why it can be good to crash for invalid cases. Since you don't handle a bunch of failure cases, you end up writing less code. And since less time is spent in the debugger, more time is focused on the correct task: achieving architectural goals rather than solving structural problems.
After you acquire a deeper understanding of the architecture, it is best to redesign (throw away) your previous attempt. After the second and especially the third iteration you will have written a solid and elegant program in a relatively small amount of time. Programming is about trusting yourself to make decent decisions based on your current knowledge.
As with anything, there is only a finite amount of time to solve a problem. So if you don't have a lot of time then don't fret if your code isn't perfect (or reusable) as long as it works.