Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Laravel News:
Measure Anything in Laravel with StatsD
Sep 26, 2017 @ 10:53:28

On the Laravel News site there's a new tutorial posted showing you how to integrate your Laravel application with StatsD for statistics gathering. StatsD is a project from Etsy that runs as a Node.js platform and listens for incoming connections providing statistics to record to the system.

I want to show you some tools and techniques you can use to measure anything and everything that you want in your Laravel applications with StatsD. These ideas are simple and not new; yet, I believe that the simplicity and power are what makes StatsD great.

You can also take the ideas in this article and apply them to any programming language or stack. Instrumenting your code can have a huge payoff as your application scales and can help you gain deep insights.

The post starts off by talking about how integrating new features like this should be as painless as possible and some about what StatsD provides. It then talks about "instrumentation" of your code and how metrics can provide insight into what your code is doing and how well it does it. It shows you how to set up the Graphite/StatsD Docker container and how to install the league/statsd package to help make the connection to the server. The post wraps up with some examples of statistics you might want to measure and the code to increment/decrement values in both normal code and middleware (including controller execution time).

tagged: tutorial laravel graphite statsd statistics gather increment decrement

Link: https://laravel-news.com/measure-anything-laravel-statsd