Hi,
In one of our projects we discoverd an issue with the metrics counts. I extracted a relevant example here: https://github.com/n1ko-w1ll/SpringBootActuatorIssue
Problem: If the return type is DeferredResult<ResponseEntity<?>>, the counted status code is 200 even if you set the result to new ResponseEntity<>(HttpStatus.CREATED). Without the DeferredResult everything works as expected.
UPDATE:
the output of the metrics endpoint after 1 POST to /create looks like this:
{
...
"counter.status.200.create": 1,
...
}