pub struct ObservabilityDecorator { /* private fields */ }Expand description
Built-in decorator that bundles audit, authorizer, tracer, and cost tracker observability and applies them to every spawned agent.
Construct with ObservabilityDecorator::new (all fields
None) then attach the pieces you want via the with_* builders.
Fields left None are simply not applied — no warning, no
silent-drop. This replaces the four deprecated no-op setters on
SupervisorBuilder (with_audit, with_authorizer,
with_tracer, with_cost_tracker).
Implementations§
Source§impl ObservabilityDecorator
impl ObservabilityDecorator
Sourcepub fn with_audit(self, audit: Arc<AuditLog>) -> Self
pub fn with_audit(self, audit: Arc<AuditLog>) -> Self
Attach an audit log. Replaces any previously-set audit log.
Attach an authorizer. Replaces any previously-set authorizer.
Sourcepub fn with_tracer(self, tracer: Arc<Tracer>) -> Self
pub fn with_tracer(self, tracer: Arc<Tracer>) -> Self
Attach a tracer. Replaces any previously-set tracer.
Sourcepub fn with_cost_tracker(self, tracker: Arc<CostTracker>) -> Self
pub fn with_cost_tracker(self, tracker: Arc<CostTracker>) -> Self
Attach a cost tracker. Replaces any previously-set tracker.
Borrow the authorizer, if set.
Sourcepub fn cost_tracker(&self) -> Option<&Arc<CostTracker>>
pub fn cost_tracker(&self) -> Option<&Arc<CostTracker>>
Borrow the cost tracker, if set.
Trait Implementations§
Source§impl AgentDecorator for ObservabilityDecorator
impl AgentDecorator for ObservabilityDecorator
Source§fn decorate<'a>(&self, builder: AgentBuilder<'a>) -> AgentBuilder<'a>
fn decorate<'a>(&self, builder: AgentBuilder<'a>) -> AgentBuilder<'a>
Apply this decorator’s transforms to the builder. The
implementor may chain
audit_log, tracer, authorizer,
cost_tracker, capabilities, middleware, etc., then return
the builder for the caller to .build().Source§impl Clone for ObservabilityDecorator
impl Clone for ObservabilityDecorator
Source§fn clone(&self) -> ObservabilityDecorator
fn clone(&self) -> ObservabilityDecorator
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for ObservabilityDecorator
impl Default for ObservabilityDecorator
Source§fn default() -> ObservabilityDecorator
fn default() -> ObservabilityDecorator
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for ObservabilityDecorator
impl !UnwindSafe for ObservabilityDecorator
impl Freeze for ObservabilityDecorator
impl Send for ObservabilityDecorator
impl Sync for ObservabilityDecorator
impl Unpin for ObservabilityDecorator
impl UnsafeUnpin for ObservabilityDecorator
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