0

SpringBoot v2.5.1

在获取有关内存指标的信息时,我会返回类似4.86064488E8的值,这不是最佳选择,因为我的目标不是每次都进行算术运算,而是快速获取有关当前状态的信息。有没有办法自定义格式或至少获得类似{ "statistic": "VALUE", "value": "486.06 Mb" }或至少更具可读性的价值?

GET /actuator/metrics/jvm.memory.used

{
    "name": "jvm.memory.used",
    "description": "The amount of used memory",
    "baseUnit": "bytes",
    "measurements": [
        {
            "statistic": "VALUE",
            "value": 4.86064488E8
        }
    ],
      ...
}
4

0 回答 0