diff --git a/proxy/src/grpc/sql_query.rs b/proxy/src/grpc/sql_query.rs index 496b94b923..d8fa9d817c 100644 --- a/proxy/src/grpc/sql_query.rs +++ b/proxy/src/grpc/sql_query.rs @@ -37,6 +37,7 @@ const STREAM_QUERY_CHANNEL_LEN: usize = 20; impl Proxy { pub async fn handle_sql_query(&self, ctx: Context, req: SqlQueryRequest) -> SqlQueryResponse { + GRPC_HANDLER_COUNTER_VEC.query.inc(); self.hotspot_recorder.inc_sql_query_reqs(&req).await; match self.handle_sql_query_internal(ctx, req).await { Err(e) => { @@ -80,6 +81,7 @@ impl Proxy { ctx: Context, req: SqlQueryRequest, ) -> BoxStream<'static, SqlQueryResponse> { + GRPC_HANDLER_COUNTER_VEC.stream_query.inc(); self.hotspot_recorder.inc_sql_query_reqs(&req).await; match self.clone().handle_stream_query_internal(ctx, req).await { Err(e) => stream::once(async { diff --git a/proxy/src/metrics.rs b/proxy/src/metrics.rs index 18dd8a1b9c..c2930c7c02 100644 --- a/proxy/src/metrics.rs +++ b/proxy/src/metrics.rs @@ -12,8 +12,10 @@ make_auto_flush_static_metric! { write_failed, query_succeeded, query_failed, + query, stream_query_succeeded, stream_query_failed, + stream_query, write_succeeded_row, write_failed_row, query_succeeded_row, diff --git a/server/src/grpc/metrics.rs b/server/src/grpc/metrics.rs index d86109766f..65f44626ee 100644 --- a/server/src/grpc/metrics.rs +++ b/server/src/grpc/metrics.rs @@ -38,8 +38,7 @@ make_auto_flush_static_metric! { pub label_enum RemoteEngineGrpcTypeKind { write_succeeded, write_failed, - query_succeeded, - query_failed, + stream_query, stream_query_succeeded, stream_query_failed, write_succeeded_row, diff --git a/server/src/grpc/remote_engine_service/mod.rs b/server/src/grpc/remote_engine_service/mod.rs index bc6f8535d3..e87b057b6c 100644 --- a/server/src/grpc/remote_engine_service/mod.rs +++ b/server/src/grpc/remote_engine_service/mod.rs @@ -235,6 +235,7 @@ impl RemoteEngineService for RemoteEngineServiceImpl &self, request: Request, ) -> std::result::Result, Status> { + REMOTE_ENGINE_GRPC_HANDLER_COUNTER_VEC.stream_query.inc(); match self.stream_read_internal(request).await { Ok(stream) => { let new_stream: Self::ReadStream = Box::pin(stream.map(|res| match res {