Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to find how many requests per second , my spring boot app received?

We are using spring boot and with it we have only one rest service , we are receiving requests for that from a single client , but with so many calls , because of that 1 in every 12 requests are failing , how to find how many requests per second my spring boot receiving , is their any way to monitor this metric in production ?

can some one please help us ?

like image 570
Bravo Avatar asked Jan 28 '18 02:01

Bravo


1 Answers

As you are using a Spring Boot related project, I would recommend using Springs actuator package. Integrating this functionality is as easy as adding the new dependency to your project:

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-actuator</artifactId>
</dependency>

with this enabled you have access to several new endpoints like /trace, /metrics, /trace, /health and much more.

For more information have a look at the official Spring documentation (https://docs.spring.io/spring-boot/docs/current/reference/html/production-ready-endpoints.html) or at the following blog post from Baeldung http://www.baeldung.com/spring-boot-actuators.

like image 60
rieckpil Avatar answered Sep 24 '22 02:09

rieckpil