mardi 14 avril 2015

spring actuator increases the metric counter.status.200.{my endpoint} even if the endpoint returns a 500

I've developed my first rest service with Spring Boot, Spring MVC Spring Actuator using embedded tomcat 8.


For some reason, when the endpoint fails due to an exception which is not caught, the returned response from the endpoint has the status 500, but the metric of counter.status.200. was increased.


I debug a bit the code and looks like the status of the response in the class ResponseFacade (from tomcat) is set after the metric is increased on the MetricFilterAutoConfiguration.MetricsFilter.


Does someone has an idea how can I get the right status code counter (counter.status.500.{my endpoint}) increased?


Thanks in advance


Aucun commentaire:

Enregistrer un commentaire