It look's like I didn't get spring boot metrics
I have spring boot 2 app and org.springframework.boot:spring-boot-starter-actuator
How to get data from this response programmatically?
https://localhost/actuator/metrics/http.server.requests?tag=status:200
{
"name": "http.server.requests",
"baseUnit": "seconds",
"measurements": [
{
"statistic": "COUNT",
"value": 1.0
},
{
"statistic": "TOTAL_TIME",
"value": 250.654721314
},
{
"statistic": "MAX",
"value": 0.0
}
],
"availableTags": [
{
"tag": "exception",
"values": [
"ClientAbortException"
]
},
{
"tag": "method",
"values": [
"GET"
]
},
{
"tag": "uri",
"values": [
"/users/metric"
]
},
{
"tag": "outcome",
"values": [
"SUCCESS"
]
}
]
}
I tried
@Autowired
private SimpleMeterRegistry meterRegistry;
Counter counter = meterRegistry.counter("http.server.requests");
Iterable<Measurement> measure = counter.measure();
but it doesn't have data I need. It's zero