1. Concept library
  2. Java & Spring Boot
  3. Module 13: Observability and deployment

Concept

Actuator and metrics

Spring Boot Actuator exposes health, metrics and info endpoints, and Micrometer ships the metrics to Prometheus or similar. It is how you see what a running service is doing.

What a session covers

The tutor works through these with you, in conversation and code. A session ends when you have shown them, not when a video does.

  1. Explain what the health, metrics and info endpoints expose
  2. Export metrics with Micrometer and read them in Prometheus
  3. Spot the actuator endpoint that leaks secrets on the public port

In practice

A few lines that show Actuator and metrics doing its job.

YAML
management:
  endpoints:
    web:
      exposure:
        include: health, info, metrics, prometheus
  endpoint:
    health:
      probes:
        enabled: true      # /actuator/health/liveness and /readiness
# then: @Timed on a method, or meterRegistry.counter("orders.placed").increment()

The common mistake

Watch for

Exposing every actuator endpoint on the public port. env, heapdump and threaddump reveal secrets and internals; expose a short list, and put the rest on a management port behind the network.

What to know first

Your roadmap puts these before Actuator and metrics, unless you already know them.

How it stays learned

Once a session shows you understand Actuator and metrics, it comes back for review. Each review takes a minute and tells the memory model how well you still know it.

  1. Day 3First recall, while it is fresh
  2. Day 7Second, a week on
  3. Day 18Last, when it has settled