Skip to main content

collect_metrics

Function collect_metrics 

Source
pub fn collect_metrics(
    on_run_start: impl Fn() + Send + Sync + 'static,
    on_run_end: impl Fn() + Send + Sync + 'static,
) -> (Box<dyn Fn(Arc<dyn InvocationContext>) -> Pin<Box<dyn Future<Output = Result<Option<Content>, AdkError>> + Send>> + Send + Sync>, Box<dyn Fn(Arc<dyn InvocationContext>) -> Pin<Box<dyn Future<Output = ()> + Send>> + Send + Sync>)
Available on crate feature plugin only.
Expand description

Helper to create a metrics collection callback.