12 minutes / published

Observability Is a Debugging Story, Not a Dependency List

Actuator, Prometheus, structured logs, correlation IDs, and cache metrics only matter when they answer an incident question.

Start With The Question

Phase 6 does not begin by adding libraries. It begins with two debugging prompts: given a failed request ID, reconstruct the endpoint, status, error, and timing; given a slow showtime lookup, decide whether the cache or database path was used.

That is why the artifacts are transcripts, not screenshots of a dependency tree. The dependency tree is only useful after it creates evidence.

The Public Actuator Surface Is Narrow

The demo exposes health and info publicly. Prometheus remains narrow but requires authentication because operational visibility is not the same as a public inspection endpoint.

The Prometheus registry is explicit, and the custom showtime metric uses tags that answer a real question: which cinema was queried and whether the cache result was a hit or miss.

Correlation IDs Connect Caller And Log

The filter accepts or generates X-Correlation-ID, stores it in MDC, returns it to the caller, and emits an ECS-shaped structured request log.

A support answer can now begin from a header value and end at method, path, status, duration, and ProblemDetail payload without guessing.

Cache Metrics Need An Eviction Story

Caffeine makes the hot showtime read path cheap, but caching is only honest when the write path is named.

The course test proves miss, hit, explicit eviction, and a second miss. That gives the article a lifecycle story instead of a benchmark-shaped anecdote.

Boot 3 To 4 Delta

Spring Boot 4 keeps Actuator, Micrometer, and Spring Cache recognizable, but structured logging no longer needs to be treated as a bespoke logging detour.

The useful migration habit is to choose the native Boot surface first, then add only the fields an operator needs to answer the debugging question.