pub struct MetricsCollector { /* private fields */ }
Expand description
Metrics collector for MCP server
Implementations§
Source§impl MetricsCollector
impl MetricsCollector
pub fn new(config: MonitoringConfig) -> MetricsCollector
pub async fn start_collection(&self)
pub async fn stop_collection(&self)
pub async fn process_request( &self, request: Request, _context: &RequestContext, ) -> Result<Request, Error>
pub async fn process_response( &self, response: Response, _context: &RequestContext, ) -> Result<Response, Error>
pub async fn get_current_metrics(&self) -> ServerMetrics
pub async fn get_uptime_seconds(&self) -> u64
Auto Trait Implementations§
impl Freeze for MetricsCollector
impl RefUnwindSafe for MetricsCollector
impl Send for MetricsCollector
impl Sync for MetricsCollector
impl Unpin for MetricsCollector
impl UnwindSafe for MetricsCollector
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more