官术网_书友最值得收藏!

Human operators

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": "64mb"
}
}
],
"outcome": "UP"
}

Here, we see the memory-check procedure with its UP state and additional free-heap data item of the string type with the value of 64mb.

Eclipse resources/GitHub coordinates for MP-Health:
The MP-Health project source code can be found at  https://github.com/eclipse/microprofile-health.
主站蜘蛛池模板: 新密市| 从化市| 繁昌县| 福建省| 土默特右旗| 东城区| 雷波县| 灵璧县| 嘉兴市| 阿合奇县| 江安县| 崇明县| 寿宁县| 新蔡县| 来凤县| 淮阳县| 南部县| 桐梓县| 保亭| 山阴县| 松江区| 东阿县| 咸丰县| 嘉峪关市| 慈溪市| 乡宁县| 积石山| 大理市| 简阳市| 高要市| 阿拉善盟| 广河县| 蓬溪县| 临泉县| 津南区| 开阳县| 三河市| 大足县| 阳江市| 通化县| 曲水县|