feat: add status code label to prometheus http request counter

This commit is contained in:
Rohan Kumar 2024-01-30 11:26:01 +05:30
parent ae3c31a82c
commit 5833070358
2 changed files with 9 additions and 4 deletions

View file

@ -19,7 +19,7 @@ lazy_static! {
pub static ref MEILISEARCH_HTTP_RESPONSE_TIME_CUSTOM_BUCKETS: [f64; 29] = create_buckets();
pub static ref MEILISEARCH_HTTP_REQUESTS_TOTAL: IntCounterVec = register_int_counter_vec!(
opts!("meilisearch_http_requests_total", "Meilisearch HTTP requests total"),
&["method", "path"]
&["method", "path", "status"]
)
.expect("Can't create a metric");
pub static ref MEILISEARCH_DEGRADED_SEARCH_REQUESTS: IntGauge = register_int_gauge!(opts!(