4 ms·
My first question when I am considering a product like this is how can I get an email when there's an error in my application. Why isn't that in the top level f
by cja 3y ago
My first question when I am considering a product like this is how can I get an email when there's an error in my application. Why isn't that in the top level feature list of everything like this, or am I unusual in thinking that this is an essential feature of any hosting system?
- throwawaaarrgh 3y agoSome hosting systems may support that out of the box but I don't know what they are. Typically you would use metrics, monitors and alerts and create a notification alert based on certain conditions. No reason they couldn't provide some out of the box, but it's not common. At the very least it would need to stop after a short number of alerts or they'd end up spamming customers if it crashes on a loop
- evbogue 3y agoI've started tossing https://ntfy.sh/ https://ntfy.sh/ alerts into my Deno apps to get push notifications for things I'm interested in
- skybrian 3y agoMy wife has had good luck using Pushover [1], which seems similar. I wonder how these services compare? [1] https://pushover.net/ https://pushover.net/
- evbogue 3y agoPushover looks very similar to Ntfy, but I haven't tried it yet.
- cja 3y agoI actually use Pushover for a project but it just does the notification part and requires me to catch all errors and send them to Pushover. I'm looking for the hosting service to catch unhanded errors automatically
- st0le 3y agohttps://sentry.io/welcome/ https://sentry.io/welcome/ ?
- kbenson 3y agoI think the answer to that is the same as the answer to "how do I send an email in Deno?", since this lets you run arbitrary code. System level cron needs that feature built in because you're just telling it a command to run, and you're limited in how you deal with error and output handling of that command. That's not a problem when you're in the language you're using to define the action. Just catch your errors, or grab all STDOUT/STDERR with some solution and do with it what you want on success or error.
- fiddlerwoaroof 3y agoThe downside is that when it has to be done on a job-by-job basis, you can’t rely on the cron system handling failure modes you didn’t anticipate.
- kbenson 3y agoIt's code. There is not necessarily a single solution that makes sense. The thing you're calling could throw an exception, or it could return a failure value. If it fails, you may want to set off some extra routine that retries, or perhaps you want to handle some specific errors and retry or notify, but other errors are critical and cause failure, not just notification. Having it handle those automatically is not a feature in some cases, it's a problem. System cron is simple, by design, because as a DSL there's a benefit to not complicating it. If you're already in Javascript/Typescript, a lot of the benefits of that are mitigated by the benefits of having much more control over exactly how it functions in every care. As an example of this, there's a bunch of cron "helpers" to deal with the shortcomings of cron's simplistic approach, such as those in moreutils[1]. P.S. Personally I wouldn't have even called this implementation cron and use the cron syntax for it, since that just makes people assume cron usage and the cron scheduling format is not an asset if you're already in a language where you could just pass in a structure with the specific fields you want set by name. 1: https://rentes.github.io/unix/utilities/2015/07/27/moreutils-package/ https://rentes.github.io/unix/utilities/2015/07/27/moreutils...
- deleted 3y ago[deleted]