
#View monit logs install#
Now let’s go back to work 😉 Install minimalistic Ruby-on-Rails app (no monitoring so far) How fun is the last command ? It’s just saying that Redis is running. Ruby 3.1.2p20 // you need at least version 3 hereĨ.3.0 // you need at least version 7.1 here You need Redis to be installed and running. Take time to view their GitHub repository, the main screenshot should be clear enough Prerequisites for this tutorialĬheck that you have at least the following versions. Logster is a Rails gem that will track bugs and their stacktrace. Teams tend to use external apps for such features, but here we will rely on the incredible abilities of Rails to integrate 3rd party tools to save a few bucks. There’s no such thing alas for monitoring. The use of ActiveRecord in Rails is often recognized as “the Rails way” to access data : intuitive, straightforward, readable, etc. It could be viewed as a “Zen” philosophy for coders (or Hakuna matata, pick your poison). Simplicity, convention over configuration, readability. The “Rails way” is some kind of philosophy. To catch bugs as soon as possible, developers often drop a monitoring solution right before the 1st day of live production of your app.


So you have to handle exceptions for your user in the most comfortable way possible, and you should try to monitor what happened in order to correct the bug afterward.Ĭorrecting bugs afterward is not something to be targeted, but, in the other way, we have to humbly admit that bugs will arise, even if we did everything to avoid them. It’s okay because you’re the developer, but you probably don’t want the final user to see any backtrace – and, in a shiny, ideal world, not any bug. Locally, you don’t need this because each error will be printed in the console, and will blow in the current tab of your browser. And put a backtrace history in a file accessible to the team. “Log monitoring” means tracking warnings and bugs. You can use a SaaS to monitor your logs, but you can also directly implement this feature inside your Ruby-on-Rails stack.
