diff --git a/libs/rpc/admin/generated/admin.SessionAdmin.rs b/libs/rpc/admin/generated/admin.SessionAdmin.rs index e7b46c2..46fa12a 100644 --- a/libs/rpc/admin/generated/admin.SessionAdmin.rs +++ b/libs/rpc/admin/generated/admin.SessionAdmin.rs @@ -305,58 +305,6 @@ pub mod session_admin_client { .insert(GrpcMethod::new("admin.SessionAdmin", "IsUserOnline")); self.inner.unary(req, path, codec).await } - pub async fn get_metrics( - &mut self, - request: impl tonic::IntoRequest< - crate::admin::generated::admin::GetMetricsRequest, - >, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::unknown( - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic_prost::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/admin.SessionAdmin/GetMetrics", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("admin.SessionAdmin", "GetMetrics")); - self.inner.unary(req, path, codec).await - } - pub async fn export_metrics_csv( - &mut self, - request: impl tonic::IntoRequest< - crate::admin::generated::admin::ExportMetricsCsvRequest, - >, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::unknown( - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic_prost::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/admin.SessionAdmin/ExportMetricsCsv", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("admin.SessionAdmin", "ExportMetricsCsv")); - self.inner.unary(req, path, codec).await - } } } /// Generated server implementations. @@ -442,22 +390,6 @@ pub mod session_admin_server { tonic::Response, tonic::Status, >; - async fn get_metrics( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - async fn export_metrics_csv( - &self, - request: tonic::Request< - crate::admin::generated::admin::ExportMetricsCsvRequest, - >, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; } #[derive(Debug)] pub struct SessionAdminServer { @@ -932,103 +864,6 @@ pub mod session_admin_server { }; Box::pin(fut) } - "/admin.SessionAdmin/GetMetrics" => { - #[allow(non_camel_case_types)] - struct GetMetricsSvc(pub Arc); - impl< - T: SessionAdmin, - > tonic::server::UnaryService< - crate::admin::generated::admin::GetMetricsRequest, - > for GetMetricsSvc { - type Response = crate::admin::generated::admin::GetMetricsResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request< - crate::admin::generated::admin::GetMetricsRequest, - >, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::get_metrics(&inner, request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let method = GetMetricsSvc(inner); - let codec = tonic_prost::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/admin.SessionAdmin/ExportMetricsCsv" => { - #[allow(non_camel_case_types)] - struct ExportMetricsCsvSvc(pub Arc); - impl< - T: SessionAdmin, - > tonic::server::UnaryService< - crate::admin::generated::admin::ExportMetricsCsvRequest, - > for ExportMetricsCsvSvc { - type Response = crate::admin::generated::admin::ExportMetricsCsvResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request< - crate::admin::generated::admin::ExportMetricsCsvRequest, - >, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::export_metrics_csv(&inner, request) - .await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let method = ExportMetricsCsvSvc(inner); - let codec = tonic_prost::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } _ => { Box::pin(async move { let mut response = http::Response::new( diff --git a/libs/rpc/admin/generated/admin.rs b/libs/rpc/admin/generated/admin.rs index 2162811..ab4f175 100644 --- a/libs/rpc/admin/generated/admin.rs +++ b/libs/rpc/admin/generated/admin.rs @@ -109,49 +109,6 @@ pub struct IsUserOnlineResponse { #[prost(bool, tag = "1")] pub online: bool, } -#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] -pub struct GetMetricsRequest { - /// filter by instance_id substring - #[prost(string, tag = "1")] - pub instance_filter: ::prost::alloc::string::String, - /// max snapshots per instance (default 100) - #[prost(uint32, tag = "2")] - pub limit: u32, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct GetMetricsResponse { - #[prost(message, repeated, tag = "1")] - pub instances: ::prost::alloc::vec::Vec, -} -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct InstanceMetrics { - #[prost(string, tag = "1")] - pub instance_id: ::prost::alloc::string::String, - #[prost(int64, tag = "2")] - pub timestamp_secs: i64, - /// HTTP metrics, key = metric name, value = JSON value - #[prost(map = "string, string", tag = "3")] - pub http: ::std::collections::HashMap< - ::prost::alloc::string::String, - ::prost::alloc::string::String, - >, - /// Room/room metrics - #[prost(map = "string, string", tag = "4")] - pub room: ::std::collections::HashMap< - ::prost::alloc::string::String, - ::prost::alloc::string::String, - >, -} -#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] -pub struct ExportMetricsCsvRequest { - #[prost(string, tag = "1")] - pub instance_filter: ::prost::alloc::string::String, -} -#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] -pub struct ExportMetricsCsvResponse { - #[prost(string, tag = "1")] - pub csv: ::prost::alloc::string::String, -} #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct SyncModelsRequest {} #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] @@ -576,54 +533,6 @@ pub mod session_admin_client { .insert(GrpcMethod::new("admin.SessionAdmin", "IsUserOnline")); self.inner.unary(req, path, codec).await } - pub async fn get_metrics( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::unknown( - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic_prost::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/admin.SessionAdmin/GetMetrics", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("admin.SessionAdmin", "GetMetrics")); - self.inner.unary(req, path, codec).await - } - pub async fn export_metrics_csv( - &mut self, - request: impl tonic::IntoRequest, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - > { - self.inner - .ready() - .await - .map_err(|e| { - tonic::Status::unknown( - format!("Service was not ready: {}", e.into()), - ) - })?; - let codec = tonic_prost::ProstCodec::default(); - let path = http::uri::PathAndQuery::from_static( - "/admin.SessionAdmin/ExportMetricsCsv", - ); - let mut req = request.into_request(); - req.extensions_mut() - .insert(GrpcMethod::new("admin.SessionAdmin", "ExportMetricsCsv")); - self.inner.unary(req, path, codec).await - } /// AI pub async fn sync_models( &mut self, @@ -973,20 +882,6 @@ pub mod session_admin_server { tonic::Response, tonic::Status, >; - async fn get_metrics( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; - async fn export_metrics_csv( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; /// AI async fn sync_models( &self, @@ -1504,97 +1399,6 @@ pub mod session_admin_server { }; Box::pin(fut) } - "/admin.SessionAdmin/GetMetrics" => { - #[allow(non_camel_case_types)] - struct GetMetricsSvc(pub Arc); - impl< - T: SessionAdmin, - > tonic::server::UnaryService - for GetMetricsSvc { - type Response = super::GetMetricsResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::get_metrics(&inner, request).await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let method = GetMetricsSvc(inner); - let codec = tonic_prost::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } - "/admin.SessionAdmin/ExportMetricsCsv" => { - #[allow(non_camel_case_types)] - struct ExportMetricsCsvSvc(pub Arc); - impl< - T: SessionAdmin, - > tonic::server::UnaryService - for ExportMetricsCsvSvc { - type Response = super::ExportMetricsCsvResponse; - type Future = BoxFuture< - tonic::Response, - tonic::Status, - >; - fn call( - &mut self, - request: tonic::Request, - ) -> Self::Future { - let inner = Arc::clone(&self.0); - let fut = async move { - ::export_metrics_csv(&inner, request) - .await - }; - Box::pin(fut) - } - } - let accept_compression_encodings = self.accept_compression_encodings; - let send_compression_encodings = self.send_compression_encodings; - let max_decoding_message_size = self.max_decoding_message_size; - let max_encoding_message_size = self.max_encoding_message_size; - let inner = self.inner.clone(); - let fut = async move { - let method = ExportMetricsCsvSvc(inner); - let codec = tonic_prost::ProstCodec::default(); - let mut grpc = tonic::server::Grpc::new(codec) - .apply_compression_config( - accept_compression_encodings, - send_compression_encodings, - ) - .apply_max_message_size_config( - max_decoding_message_size, - max_encoding_message_size, - ); - let res = grpc.unary(method, req).await; - Ok(res) - }; - Box::pin(fut) - } "/admin.SessionAdmin/SyncModels" => { #[allow(non_camel_case_types)] struct SyncModelsSvc(pub Arc);