Instrumenting an application
First, a caveat—there are a lot of programming languages and monitoring systems. We will be talking about various monitoring systems later in the chapter, and there are libraries for all sorts of languages and systems. So, just because I am providing examples here with specific languages and libraries, it does not mean that you cannot do something very similar with your language and monitoring system of choice.
For the first example, we will use Ruby and StatsD. Ruby is a popular scripting language and tends to be what I use when IÂ want to build something quickly. Also, some very large websites use Ruby, including GitHub, Spotify, and Hulu. StatsD is a monitoring system from Etsy. It is open source and used by many companies including Kickstarter and Hillary for America.
I have commented on this simple application as much as possible. However, if you need more documentation than my comments, see the references section.
Sinatra is a simple web framework. It creates...