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

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.
主站蜘蛛池模板: 和龙市| 寿阳县| 泾川县| 玉溪市| 东辽县| 澎湖县| 山西省| 开封县| 无为县| 府谷县| 枣阳市| 汾阳市| 淮滨县| 南皮县| 都昌县| 西藏| 西峡县| 台山市| 固镇县| 岗巴县| 游戏| 麻江县| 靖边县| 永新县| 彝良县| 醴陵市| 建德市| 琼结县| 涟水县| 临漳县| 微博| 河间市| 邵阳市| 手机| 黄石市| 师宗县| 屏东县| 镇赉县| 庆元县| 平泉县| 隆安县|