想象一下这是我的http://localhost:8080/actuator输出:
{
"_links": {
"self": {
"href": "http://localhost:8080/actuator",
"templated": false
},
"health": {
"href": "http://localhost:8080/actuator/health",
"templated": false
},
"prometheus": {
"href": "http://localhost:8080/actuator/prometheus",
"templated": false
},
"httptrace": {
"href": "http://localhost:8080/actuator/httptrace",
"templated": false
}
}
}
现在我已经将我的 prometheus 环境连接到/actuator/prometheus
并且工作正常。我还希望 prometheus 读取我的 httptrace,所以我也添加/actuator/httptrace
到我的 prometheus 配置中。但是,这不起作用。httptrace端点上的格式是json,prometheus中的格式是yaml,我想我需要prometheus yaml中的httptrace。Prometheus 吃 yaml 就好了,json 没那么多。
如何将我的 httptrace 从我的 Spring Boot 项目传递给 actuator/prometheus?最后,我的目标是获取 grafana 中每个请求的 timeTaken 值。