Spring boot’s actuator module allows us to monitor and manage application usages in production environment, without coding and configuration for any of them. These monitoring and management information is exposed via REST like endpoint URLs.
The simplest way to enable the features is to add a dependency to the spring-boot-starter-actuator
starter pom file.
< dependency > < groupId >org.springframework.boot</ groupId > < artifactId >spring-boot-starter-actuator</ artifactId > </ dependency > |
Spring Boot includes a number of built-in endpoints and lets we add our own. Further, each individual endpoint can be enabled or disabled as well.
Some of important and widely used actuator endpoints are given below:
ENDPOINT | USAGE |
---|---|
/env | Returns list of properties in current environment |
/health | Returns application health information. |
/auditevents | Returns all auto-configuration candidates and the reason why they ‘were’ or ‘were not’ applied. |
/beans | Returns a complete list of all the Spring beans in your application. |
/trace | Returns trace logs (by default the last 100 HTTP requests). |
/dump | It performs a thread dump. |
/metrics | It shows several useful metrics information like JVM memory used, system CPU usage, open files, and much more. |