Emitting metrics
The previous recipe gave an overview of the capabilities provided by Spring Boot Actuators. We played with different management endpoints such as /info
and /health
and even created our own health metrics to add to the default set. However, besides the health status, there are a number of things that we, as developers and operations folks, want to be able to see and monitor on an ongoing basis, and just knowing that the uplink is functional is not good enough. We would also like to see the number of open sessions, concurrent requests to the application, latency, and so on. In this recipe, you will learn about the metric reporting facilities in Spring Boot as well as how to add our own metrics and some quick and simple ways of visualizing them.
Getting ready
To help us visualize the metrics better, we will use a great open source project, spring-boot-admin
, located at https://github.com/codecentric/spring-boot-admin. It provides a simple web UI on top of the Spring Boot Actuators...