Evaldas Buinauskas
03/31/2023, 6:16 AM/// HTTP request latency histogram buckets
const HTTP_REQUESTS_HISTOGRAM_BUCKETS_SECONDS: &[f64; 18] = &[
0.010, 0.020, 0.030, 0.050, 0.060, 0.070, 0.080, 0.090, //
0.100, 0.150, 0.200, 0.250, 0.300, 0.350, 0.400, 0.450, //
0.500, // Timeout limit
0.600, // Catch all
];
lazy_static::lazy_static! {
/// Tracks request histogram
pub static ref HTTP_REQ_HISTOGRAM: HistogramVec = register_histogram_vec!(
"http_request_duration_seconds",
"The HTTP request latencies in seconds.",
&[HANDLER_LABEL, PORTAL_LABEL, QUERY_LABEL],
HTTP_REQUESTS_HISTOGRAM_BUCKETS_SECONDS.to_vec()
)
.expect("valid histogram vec metric");
}
π