Expand description
Metrics hooks for observing handler activity.
Implement Metrics to receive callbacks on requests, responses, errors,
and queue depth changes. The default no-op implementation can be overridden
selectively.
§Example
use a2a_protocol_server::metrics::Metrics;
struct MyMetrics;
impl Metrics for MyMetrics {
fn on_request(&self, method: &str) {
println!("request: {method}");
}
}Structs§
- Noop
Metrics - A no-op
Metricsimplementation that discards all events.
Traits§
- Metrics
- Trait for receiving metrics callbacks from the handler.