Histogram for web service request duration
Tracks request execution time and counts for a web service managed by GAS.
| Labels | Value | Purpose |
|---|---|---|
|
Time of execution in seconds |
|
This histogram is configured in the GAS configuration file (as.xcf) in the HISTOGRAM_BUCKETS element; for details about the bucket used to
measure web-service response times, see the
res.prometheus.rq_service_duration.buckets resource.
Metric examples:
fourjs_gas_service_request_duration_seconds{url="/ws/r",service="demo/Calculator",le="0.001"} 0
fourjs_gas_service_request_duration_seconds{url="/ws/r",service="demo/BookService",le="0.005"} 1
fourjs_gas_service_request_duration_seconds_sum{url="/ws/r",service="demo/BookService"} 0.034
fourjs_gas_service_request_duration_seconds_count{url="/ws/r",service="demo/BookService"} 4
Grafana
PromQL queries for percentile and average request duration are provided.
- PromQL query (percentile):
This query calculates the 90th percentile of request duration for the BookService, helping you monitor response time for most users.histogram_quantile(0.90, sum(rate(fourjs_gas_service_request_duration_seconds_bucket {service="demo/BookService"}[$__rate_interval])) by (le)) - PromQL query
(rate):
This query calculates the average request duration rate for the BookService.rate(fourjs_gas_service_request_duration_seconds_sum{service="demo/BookService"}[5m]) / rate(fourjs_gas_service_request_duration_seconds_count{service="demo/BookService"}[5m])