Introduction
In this article, we will inspect actuators, although the actuator concept came to light because of SpringBoot. It’s a sub-project of the SpringBoot framework, but the fundamentals can be adopted in other languages and frameworks as well. Python has adopted it and developed a library called ‘Pyctuator’. In the article, we will cover,
- What are Actuators
- Examples of Actuators
- Details about them
What are Actuators
Actuators are endpoints that help in monitoring the application, in short, it allows us to see what’s going on in the running application. With actuators, we will be able to check,
- Applications Health status
- Metrics
- Auditing
- Caching details
- heap dump
- environment details
- thread dump
- event monitoring and alerting.
All the above points are extremely helpful especially in Microservices architecture, let’s understand by a few practical scenarios.
- Imagine a service is running on any environment that is not performing, by simply Invoking endpoint /dump the entire thread activity will be available to us like deadlock detection, system resource detection, etc. for better analyzing the problem.
- Consider a REST service it has an in-memory cache of Objects, we can always invoke /cache endpoint to monitor what’s going on with our cache internally
- With /env endpoint, we can better analyze the environmental details like a port on which the service is running, JVM version, system environment details.
- If any endpoint is taking a lot of time to respond, then with the help of the endpoint ‘/prometheus’ endpoint we can get the information of how much time the endpoint has taken to respond.
Let’s explore some of the actuator endpoints with a sample SpringBoot service. We will explore four actuator endpoints,
- /actuator/health
- /actuator/env
- /actuator/prometheus
- /actuator/heapdump
SpringBoot provides these actuator endpoints out of the box, all we need to do is to import an actuator library and enable the actuators we want.
.gradle
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-actuator'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
}
.properties
Management.endpoints.web.exposure.include=health,info,dump,metrics,env,prometheus,heapdump









Join the conversation! Your thoughts help the community grow.