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.
The MP-Health project source code can be found at https://github.com/eclipse/microprofile-health.
推薦閱讀
- 黑客攻防實戰(zhàn)技術完全手冊:掃描、嗅探、入侵與防御
- 計算機網絡與通信(第2版)
- CorelDRAW X6 中文版圖形設計實戰(zhàn)從入門到精通
- 物聯(lián)網(IoT)基礎:網絡技術+協(xié)議+用例
- 物聯(lián)網安全:理論、實踐與創(chuàng)新
- GPS/GNSS原理與應用(第3版)
- 物聯(lián)網+BIM:構建數字孿生的未來
- 農產品物聯(lián)網研究與應用
- 計算機網絡與數據通信
- NB-IoT物聯(lián)網技術解析與案例詳解
- 物聯(lián)網之霧:基于霧計算的智能硬件快速反應與安全控制
- Spring 5.0 Projects
- 6G新技術 新網絡 新通信
- OMNeT++與網絡仿真
- 基于性能的保障理論與方法