Mastering Spring Boot 2.0
上QQ阅读APP看书,第一时间看更新

Spring Boot Actuator – taking Application's Insights

Have you ever thought to look at what's going on with your Spring application in production? How many objects have been created? How much free or used memory is left? Let's consider, if any framework can allow you to watch all these insights, you can manage your application very well during production by using HTTP endpoints or with JMX. You can find out how your application is behaving and check on its health.

Here, I am going to explain a key component of Spring Boot, Actuator. The Spring Boot Actuator allows you to monitor production-ready features, such as metrics and the health of the Spring application.

Spring Boot Actuator is a sub-project of Spring Boot, with a lot more functionalities at your disposal. You can control the sensitivity and security of your application more effectively with Spring Boot Actuator. Monitoring the metrics, incoming traffic, and state of a database in your applications becomes very easy when Actuator is enabled. The main advantage is that these production-grade tools are available to you, without you having to implement these features.

Let's see how to enable these production-ready features in your Spring application.