feat: Correct server metrics and add more metrics for scan (#3426)

* feat: drop timer on stream terminated

* refactor: combine metrics into a histogram vec

* refactor: frontend grpc metrics

* feat: add metrics middleware layer to grpc server

* refactor: move http metrics layer to metrics mod

* feat: bucket for grpc/http elapsed

* feat: remove duplicate metrics

* style: fix cilppy

* fix: incorrect bucket of promql series

* feat: more metrics for mito

* feat: convert cost

* test: fix metrics test
This commit is contained in:
Yingwen
2024-03-04 18:15:10 +08:00
committed by GitHub
parent ae2c18e1cf
commit 49157868f9
21 changed files with 314 additions and 194 deletions

View File

@@ -557,7 +557,8 @@ pub async fn test_metrics_api(store_type: StorageType) {
let res = client.get("/metrics").send().await;
assert_eq!(res.status(), StatusCode::OK);
let body = res.text().await;
assert!(body.contains("frontend_handle_sql_elapsed"));
// Comment in the metrics text.
assert!(body.contains("# HELP"));
guard.remove_all().await;
}