August 2019
Intermediate to advanced
256 pages
6h 43m
English
The primary use case for the JSON response payload is to provide a way for operators to investigate the application state. To support this, health checks allow for additional data to be attached to a health check response as we have seen in the CheckDiskspace and ServiceCheck examples. Consider the following fragment:
[...]return HealthCheckResponse .named("memory-check") .withData("free-heap", "64mb") .up() .build();[...]
Here, the additional information about free-heap is provided and will become part of the response payload, as shown in this response fragment. The JSON response fragment showing memory-check procedure content is as follows:
{... "checks": [ { "name": "memory-check", "state": "UP", "data": { "free-heap": ...Read now
Unlock full access