Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

http_server_requests_seconds_max exact meaning in Micrometer

In Prometheus I've got 14 seconds for http_server_requests_seconds_max.

http_server_requests_seconds_max{exception="None",method="GET",outcome="SUCCESS",status="200",uri="/v1/**",} 14.3

Does this mean the total time for the request from the server to the client or does it only measure the time in the Spring container? I'm also measuring the time inside spring to process the data and it only takes 2.5 seconds. What I want to know is if it is a problem in Spring or if it is because of a slow network. Any Ideas?

like image 475
Jürgen Avatar asked Feb 13 '20 11:02

Jürgen


People also ask

What is http_ server_ requests_ seconds_ max?

http_server_requests_seconds_max is the maximum request duration during a time window. The value resets to 0 when a new time window starts. The default time window is 2 minutes.

What is Jvm_gc_pause_seconds_sum?

jvm_gc_pause_seconds or jvm_gc_pause_seconds_sum. is a Micrometer client metric that is used in Spring Boot.

What is MeterRegistry?

MeterRegistry In Micrometer, a MeterRegistry is the core component used for registering meters. We can iterate over the registry and further each meter's metrics to generate a time series in the backend with combinations of metrics and their dimension values. The simplest form of the registry is SimpleMeterRegistry.

What is spring boot micrometer?

Micrometer is the metrics collection facility included in Spring Boot 2's Actuator. It has also been backported to Spring Boot 1.5, 1.4, and 1.3 with the addition of another dependency. Micrometer adds richer meter primitives to the counters and gauges that existed in Spring Boot 1.


1 Answers

From the documentation, when @Timed attribute is used on a function or a Controller, it produces the metrics http_server_requests.

which by default contains dimensions for the HTTP status of the response, HTTP method, exception type if the request fails, and the pre-variable substitution parameterized endpoint URI.

The http_server_requests_seconds_max is then computed as explained in this discussion

public static final Statistic MAX

The maximum amount recorded. When this represents a time, it is reported in the monitoring system's base unit of time.

In your case, it means that one of you endpoint in the range /v1/** (i.e. one of all of them) called a @Timed function that took 14sec to execute.

For more information you would need percentiles or histograms metrics. It may happen only once; usually at the first request wen cache need to be built or services needs to warm up.

like image 176
Michael Doubez Avatar answered Dec 21 '22 19:12

Michael Doubez