July 2018
Intermediate to advanced
574 pages
14h 7m
English
Instead of looking at the frequency of observations by bucket, let's use the histogram_quantile() query function to calculate some percentiles. This way, we'll better understand the distribution of our /health response times. We'll start by calculating the 50th percentile, replacing the previous metric with the following expression:
histogram_quantile(0.5, rate( http_request_duration_microseconds_bucket{request_path="/health", pod=~"elixir-drip.*"}[5m] ))
We are using the rate(...)[5m] function to take the 5-minute average rate of the samples in each histogram bucket. Because the histogram quantile is calculated for each combination of labels the metric has, we see three different graphs for each of our pods. We also ...
Read now
Unlock full access