Skip to content

Instantly share code, notes, and snippets.

@mikermcneil
Last active August 3, 2022 16:08
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikermcneil/a3be17e3a6f25343e213f38ffa5daf2d to your computer and use it in GitHub Desktop.
Save mikermcneil/a3be17e3a6f25343e213f38ffa5daf2d to your computer and use it in GitHub Desktop.
Here's how to monitor your Sails app for missing `await`s, 500 errors, failed script runs, and more

Monitoring your Sails app for errors

Monitor your Sails app for missing awaits, 500 errors, failed script runs, and more!

Here's how to monitor a Sails app for errors using Papertrail, a logging tool that works with anything but is particularly easy to use as a Heroku add-on. This search string uses Papertrail's search syntax, but the log output it's searching for is not Heroku-specific; neither is it Papertrail-specific. (Search "sails.js platzi" for a tutorial with an example involving Heroku. See part 5.) Anyway, you can use the general principles here to monitor a Sails app using any logging tool.

(error: Sending 500 ("Server Error") response:) OR (error: Background instruction failed:) OR (WARNING: A function that was initially called over 15 seconds) OR (Error: Internal error occurred while running) OR (warn:) OR (Could not run script)
@mikermcneil
Copy link
Author

Photo essay

image
image
image
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment