Instrumenting Ruby on Rails with Prometheus

If you’re running a production application, you need metrics. There are great products out there that allow you to gain visibility into how your application is performing, give some nice graphs, and charge you for it. In the Rails community, this is commonly achieved by using NewRelic and Skylight. But for some of us, we achieve visibility by using Prometheus and Grafana that we build and host ourselves.


Ruby Debugger Using Visual Studio Code

No matter how carefully coded, reviewed, and tested your Ruby code is, odds are good that at some point you’ll cause a catastrophic failure to at least one system you’re responsible for. How do you prepare yourself? You need a Ruby debugger. In this post, I’ll cover the whole Ruby debugger process—from finding the issue to determining the root cause. Use these instructions for debugging a single Ruby file, a Rails app, or a gem.


The Lifecycle of a Request

Most Rails developers should be pretty familiar with this work flow: open up a controller file in your editor, write some Ruby code inside an action method, visit that URL from the browser and the code you just wrote comes alive. But have you thought about how any of this works? How did typing a URL into your browser's address bar turn into a method call on your controllers? Who actually calls your methods?


How to instrument your Ruby app with the Elastic APM Ruby agent

Sending performance metrics from your Ruby app to APM Server can be as easy as installing the elastic-apm Rubygem. Most integrations are plug-n-play, and Rails and Rack support is built in. However there are several ways to add more information to the data as well as ways to set up your own custom instrumentations.