pub struct PolicyTraceRecorder { /* private fields */ }Expand description
Trace recorder wrapper that applies TraceRedactionPolicy before forwarding records.
Implementations§
Source§impl PolicyTraceRecorder
impl PolicyTraceRecorder
Sourcepub fn new(inner: DynTraceRecorder) -> Self
pub fn new(inner: DynTraceRecorder) -> Self
Wrap a recorder with the default-safe redaction policy.
Sourcepub fn with_policy(
inner: DynTraceRecorder,
policy: TraceRedactionPolicy,
) -> Self
pub fn with_policy( inner: DynTraceRecorder, policy: TraceRedactionPolicy, ) -> Self
Wrap a recorder with an explicit redaction policy.
Sourcepub const fn policy(&self) -> &TraceRedactionPolicy
pub const fn policy(&self) -> &TraceRedactionPolicy
Return the active redaction policy.
Trait Implementations§
Source§impl TraceRecorder for PolicyTraceRecorder
impl TraceRecorder for PolicyTraceRecorder
Source§fn start_span(&self, spec: SpanSpec, parent: &TraceContext) -> SpanHandle
fn start_span(&self, spec: SpanSpec, parent: &TraceContext) -> SpanHandle
Start a child span.
Source§fn record_event(&self, span: &SpanHandle, event: SpanEvent)
fn record_event(&self, span: &SpanHandle, event: SpanEvent)
Record a span event.
Source§fn close_span(&self, span: &SpanHandle, status: SpanStatus)
fn close_span(&self, span: &SpanHandle, status: SpanStatus)
Close a span.
Auto Trait Implementations§
impl !RefUnwindSafe for PolicyTraceRecorder
impl !UnwindSafe for PolicyTraceRecorder
impl Freeze for PolicyTraceRecorder
impl Send for PolicyTraceRecorder
impl Sync for PolicyTraceRecorder
impl Unpin for PolicyTraceRecorder
impl UnsafeUnpin for PolicyTraceRecorder
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