pub struct OperationSpan { /* private fields */ }Expand description
Explicitly pass context() across execution boundaries; no ambient span is
entered across an async suspension. Completing a span emits one event.
Implementations§
Source§impl OperationSpan
impl OperationSpan
Sourcepub fn finish_observed(
self,
outcome: Outcome,
category: Option<FailureCategory>,
)
pub fn finish_observed( self, outcome: Outcome, category: Option<FailureCategory>, )
Timestamp evidence when the owner obtains it, before asynchronous delivery. A later status projection must retain this instant, never replace it.
Sourcepub fn with_attempt(self, attempt: u32) -> Self
pub fn with_attempt(self, attempt: u32) -> Self
Number an existing transport attempt; this never authorizes a retry.
Sourcepub fn record_start(&self)
pub fn record_start(&self)
Emit one bounded dispatch entry before work begins.
Sourcepub fn with_error_code(self, code: PublicErrorCode) -> Self
pub fn with_error_code(self, code: PublicErrorCode) -> Self
Attach only a closed, already-public code; no message or detail is accepted.
pub fn with_operation_id(self, operation_id: Uuid) -> Self
pub fn context(&self) -> CorrelationContext
pub fn finish(self, outcome: Outcome, failure_category: Option<FailureCategory>)
pub fn finish_with_evidence( self, outcome: Outcome, failure_category: Option<FailureCategory>, evidence: &[Measurement], )
Auto Trait Implementations§
impl Freeze for OperationSpan
impl RefUnwindSafe for OperationSpan
impl Send for OperationSpan
impl Sync for OperationSpan
impl Unpin for OperationSpan
impl UnsafeUnpin for OperationSpan
impl UnwindSafe for OperationSpan
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