pub struct WorkflowObserver { /* private fields */ }Expand description
Workflow-aware observer that focuses on correlation and performance tracking.
Designed for n8n-style workflow engines where understanding the relationship between service resolution and workflow execution is critical.
§Examples
use ferrous_di::{ServiceCollection, WorkflowObserver, ObservationContext};
use std::sync::Arc;
let mut services = ServiceCollection::new();
services.add_observer(Arc::new(WorkflowObserver::new()));
let provider = services.build();
// When resolving with workflow context, correlation will be trackedImplementations§
Trait Implementations§
Source§impl Default for WorkflowObserver
impl Default for WorkflowObserver
Source§impl DiObserver for WorkflowObserver
impl DiObserver for WorkflowObserver
Source§fn resolved(&self, key: &Key, duration: Duration)
fn resolved(&self, key: &Key, duration: Duration)
Called when a service is successfully resolved. Read more
Source§fn factory_panic(&self, key: &Key, message: &str)
fn factory_panic(&self, key: &Key, message: &str)
Called when a factory function panics during resolution. Read more
Source§fn resolving_with_context(&self, key: &Key, context: &ObservationContext)
fn resolving_with_context(&self, key: &Key, context: &ObservationContext)
Called when starting to resolve a service with workflow context. Read more
Source§fn resolved_with_context(
&self,
key: &Key,
duration: Duration,
context: &ObservationContext,
)
fn resolved_with_context( &self, key: &Key, duration: Duration, context: &ObservationContext, )
Called when a service is successfully resolved with workflow context. Read more
Source§fn factory_panic_with_context(
&self,
key: &Key,
message: &str,
context: &ObservationContext,
)
fn factory_panic_with_context( &self, key: &Key, message: &str, context: &ObservationContext, )
Called when a factory function panics during resolution with workflow context. Read more
Auto Trait Implementations§
impl Freeze for WorkflowObserver
impl RefUnwindSafe for WorkflowObserver
impl Send for WorkflowObserver
impl Sync for WorkflowObserver
impl Unpin for WorkflowObserver
impl UnwindSafe for WorkflowObserver
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