3 ms·
Soft assertions. They crash under test and in development, but log in production. Monitor the occurrences in production and alert if they go above some threshol
by draw_down 8y ago
Soft assertions. They crash under test and in development, but log in production. Monitor the occurrences in production and alert if they go above some threshold rate. The assertions should have an owning team, and potentially DRI. This info should be a required argument to the soft-assert function. Otherwise you’re just making a mess.
Hard assertions, for things that should never ever happen, or where crashing is preferable to continuing.