Analytics is an often-overlooked aspect of developing applications or services in general. Yet, when you are offering a service or providing a platform for people to interact with, it is extremely important that you know exactly what is happening on it. Who is performing which actions, what calls are being made, which calls are most expensive, which are consuming most of your resources—these are all questions that a solid analytics system will be able to answer, by making data, logs, and events meaningful.
In this chapter we are going to learn how to recognize important events and actions on our platform, identify key metrics, and keep track of them. We will also meet some tools that can be effectively used to easily build your own analytics platform.
Users and applications are constantly generating an enormous amount of data. Once your applications or APIs start living on the Web, or are being consumed by a number of other services or users, you will have to start struggling through logs and user-generated events. The problem with these streams of data is that they are actually extremely valuable at a macro level, but probably difficult to interpret individually.
Think for example of a simple log entry for a timeout. If you spotted it, you could interpret it as a simple warning of a certain error that happens every now and again in your application.
Now imagine that you could easily correlate that timeout message with certain ...