jvm-resilience-observability
Step 6 of the pipeline (WORKFLOW.md), for what a JVM service does when something it depends on is slow or
down, and for what it must expose so a person can tell. The two sections share one premise: a dependency
that fails slowly is more dangerous than one that fails fast, and a failure nobody can trace or count is one
you learn about from a customer. The first section bounds how long and how often a call may try; the
second makes the result visible. observability-instrumentation §1 to §3 carry the generic rules (the
question first, structured logs, metric cardinality); devops-conventions §3 covers monitoring and alerting;
this block adds the JVM and Spring Boot specifics.
When
- Adding or reviewing an outbound HTTP, database or queue call, or wrapping one in a retry or a breaker.
- A service hangs under a slow dependency, retries into an outage, or takes every instance out at once.
- Adding a metric tag, a log field, a health indicator or a Kubernetes probe, or changing shutdown.
Steps
Read only the section the task meets. They are independent.
| § |
Covers |
Read it when |
File |
| 1 |
Outbound calls: timeouts, retry, circuit breaker, bulkhead, time limiter, fallback, decorator order, Resilience4j |
a call to another system is added or changed, or a dependency outage spreads |
01-outbound-calls.md |
| 2 |
Operating on Spring Boot: correlation id and thread hand-offs, metric tags, probes, graceful shutdown, structured logs |
a log field, a metric, a probe or the shutdown behaviour is added or changed |
02-operating-the-service.md |
Output / checkpoint
Each rule was exercised, not read off the file: the dependency was made slow in a test or an environment and
the call returned an error within the configured timeout (§1), the failing dependency was made to fail
repeatedly and the breaker opened and the metric for its state changed (§1), a request's correlation id
appeared in a log line written from an asynchronous task (§2), the probes were queried with the database
stopped and the liveness probe stayed up (§2), and the service received a termination signal during a
request and finished it (§2). Configuration that was only read is not verified.
Guardrails
- Never leave a call without an explicit timeout, and never rely on a library's default for one (§1.1).
- Never retry an exception that is a business outcome (§1.2).
- Never put a check of an external system in the liveness probe (§2.3).
- Never use an unbounded value (an id, a raw URL, a user input) as a metric tag (§2.2).
- This block states Resilience4j 2.2, Micrometer 1.17 and Spring Boot 4.1 behaviour as of the documentation
read on the date in
references/origin.md; defaults moved between releases, so
check a number against the version in use. Nothing was run while writing it.
- Adding Resilience4j or a Micrometer registry is the user's step, in their own terminal; this block names
them and stops.
Origin
Rewritten from the Resilience4j user guide (retry, circuit breaker, bulkhead, time limiter, Spring Boot
starter), the Spring Boot actuator, logging, observability and graceful-shutdown pages, the Micrometer naming
page and the HikariCP readme (read 2026-10-08). 🟡: never run by us; open points are in references/origin.md. Overlaps with skills/spring-boot-conventions and skills/observability-instrumentation (2026-10-19); cross-referenced, not merged.
1---2name: jvm-resilience-observability3description: "Use when a Java or Spring Boot service calls another system or must be operated: timeouts on HTTP clients and the connection pool, Resilience4j retry, circuit breaker, bulkhead and time limiter and the order they wrap each other, fallbacks, and then the operating side on Spring Boot with Micrometer: a correlation id in the logging context and whether it survives a thread hand-off, meter tag cardinality, liveness versus readiness probes, graceful shutdown, structured JSON logs."4metadata:5 source: https://skillmd.com/skills/techmefr/jvm-resilience-observability6---78# jvm-resilience-observability910Step 6 of the pipeline (`WORKFLOW.md`), for what a JVM service does when something it depends on is slow or11down, and for what it must expose so a person can tell. The two sections share one premise: **a dependency12that fails slowly is more dangerous than one that fails fast, and a failure nobody can trace or count is one13you learn about from a customer**. The first section bounds how long and how often a call may try; the14second makes the result visible. `observability-instrumentation` §1 to §3 carry the generic rules (the15question first, structured logs, metric cardinality); `devops-conventions` §3 covers monitoring and alerting;16this block adds the JVM and Spring Boot specifics.1718## When19- Adding or reviewing an outbound HTTP, database or queue call, or wrapping one in a retry or a breaker.20- A service hangs under a slow dependency, retries into an outage, or takes every instance out at once.21- Adding a metric tag, a log field, a health indicator or a Kubernetes probe, or changing shutdown.2223## Steps2425**Read only the section the task meets.** They are independent.2627| § | Covers | Read it when | File |28|---|---|---|---|29| 1 | Outbound calls: timeouts, retry, circuit breaker, bulkhead, time limiter, fallback, decorator order, Resilience4j | a call to another system is added or changed, or a dependency outage spreads | [`01-outbound-calls.md`](./references/01-outbound-calls.md) |30| 2 | Operating on Spring Boot: correlation id and thread hand-offs, metric tags, probes, graceful shutdown, structured logs | a log field, a metric, a probe or the shutdown behaviour is added or changed | [`02-operating-the-service.md`](./references/02-operating-the-service.md) |3132## Output / checkpoint33Each rule was exercised, not read off the file: the dependency was made slow in a test or an environment and34the call returned an error within the configured timeout (§1), the failing dependency was made to fail35repeatedly and the breaker opened and the metric for its state changed (§1), a request's correlation id36appeared in a log line written from an asynchronous task (§2), the probes were queried with the database37stopped and the liveness probe stayed up (§2), and the service received a termination signal during a38request and finished it (§2). Configuration that was only read is not verified.3940## Guardrails41- Never leave a call without an explicit timeout, and never rely on a library's default for one (§1.1).42- Never retry an exception that is a business outcome (§1.2).43- Never put a check of an external system in the liveness probe (§2.3).44- Never use an unbounded value (an id, a raw URL, a user input) as a metric tag (§2.2).45- This block states Resilience4j 2.2, Micrometer 1.17 and Spring Boot 4.1 behaviour as of the documentation46 read on the date in [`references/origin.md`](./references/origin.md); defaults moved between releases, so47 check a number against the version in use. Nothing was run while writing it.48- Adding Resilience4j or a Micrometer registry is the user's step, in their own terminal; this block names49 them and stops.5051## Origin52Rewritten from the Resilience4j user guide (retry, circuit breaker, bulkhead, time limiter, Spring Boot53starter), the Spring Boot actuator, logging, observability and graceful-shutdown pages, the Micrometer naming54page and the HikariCP readme (read 2026-10-08). 🟡: never run by us; open points are in [`references/origin.md`](./references/origin.md). Overlaps with `skills/spring-boot-conventions` and `skills/observability-instrumentation` (2026-10-19); cross-referenced, not merged.