cross-cutting
Actuator: Health, Metrics, Tracing
Expose operational endpoints (health, metrics, info, threads, env) for monitoring, alerting, and on-call diagnosis.
An application running in production is a black box unless it exposes its own operational state. Spring Boot Actuator adds that observability layer out of the box: a set of HTTP (or JMX) endpoints that report health, metrics, configuration, and internals, so monitoring systems, load balancers, and on-call engineers can see what the service is doing without attaching a debugger.
Aircraft instrument panel — altitude, fuel, engine temperature. Without it, you're flying blind.
Key Concepts
1
Adding the spring-boot-starter-actuator dependency exposes endpoints under /actuator. The most important is /health, which aggregates health indicators for the datasource, disk space, message brokers, and any custom checks into a single UP/DOWN status — exactly what a Kubernetes liveness/readiness probe or a load balancer polls to decide whether to route traffic. /metrics (backed by Micrometer) publishes counters, gauges, and timers — request rates, latencies, JVM memory, garbage-collection pauses, thread counts — in a form Prometheus can scrape and Grafana can chart. Others round out diagnosis: /info for build and version data, /env for resolved configuration, /loggers to change log levels at runtime, and /threaddump and /heapdump for incident analysis. Micrometer acts as a vendor-neutral facade, so the same instrumentation can feed Prometheus, Datadog, or CloudWatch.
spring-boot-starter-actuator/actuator/health/metrics/info
2
The non-negotiable point for interviews is security: these endpoints reveal sensitive operational detail, so only /health (and often /info) should be publicly reachable, while /env, /heapdump, and the rest must be locked down or exposed only on an internal management port. By default Boot exposes a conservative subset over HTTP for this reason. The broader framing is that Actuator is the foundation of the three pillars of observability — health and metrics here, paired with structured logging and distributed tracing — that make a service operable in production.
/health/info/env/heapdump