pub struct RequestTrace { /* private fields */ }Expand description
The accumulated causal trace for one request, filled stage by stage.
Constructed with the RequestId and populated via
the record_* setters; assembled into a /debug/explain document by
crate::explain_json.
Implementations§
Source§impl RequestTrace
impl RequestTrace
Sourcepub fn record_context(&mut self, context: TraceContext)
pub fn record_context(&mut self, context: TraceContext)
Records the request’s W3C trace context (trace/span ids).
Sourcepub fn context(&self) -> Option<&TraceContext>
pub fn context(&self) -> Option<&TraceContext>
The request’s trace context, once recorded.
Sourcepub fn resolved_partition(&self) -> Option<&PartitionId>
pub fn resolved_partition(&self) -> Option<&PartitionId>
The partition the request resolved to, once routing has run, so a tenant-targeted diagnostics directive can be evaluated against it.
Sourcepub fn record_ingress(&mut self, info: IngressInfo)
pub fn record_ingress(&mut self, info: IngressInfo)
Records the ingress span.
Sourcepub fn record_classify(&mut self, info: ClassifyInfo)
pub fn record_classify(&mut self, info: ClassifyInfo)
Records the classify span.
Sourcepub fn record_resolve(&mut self, info: ResolveInfo)
pub fn record_resolve(&mut self, info: ResolveInfo)
Records the spi.resolve span.
Sourcepub fn record_rewrite(&mut self, info: RewriteInfo)
pub fn record_rewrite(&mut self, info: RewriteInfo)
Records the rewrite span.
Sourcepub fn record_dispatch(&mut self, info: DispatchInfo)
pub fn record_dispatch(&mut self, info: DispatchInfo)
Records the dispatch span.
Sourcepub fn record_egress(&mut self, info: EgressInfo)
pub fn record_egress(&mut self, info: EgressInfo)
Records the egress span.
Sourcepub fn record_error(&mut self, error: ErrorContext)
pub fn record_error(&mut self, error: ErrorContext)
Attaches the error context to the failing span.
Trait Implementations§
Source§impl Clone for RequestTrace
impl Clone for RequestTrace
Source§fn clone(&self) -> RequestTrace
fn clone(&self) -> RequestTrace
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 Debug for RequestTrace
impl Debug for RequestTrace
Source§impl Default for RequestTrace
impl Default for RequestTrace
Source§fn default() -> RequestTrace
fn default() -> RequestTrace
Returns the “default value” for a type. Read more
impl Eq for RequestTrace
Source§impl PartialEq for RequestTrace
impl PartialEq for RequestTrace
Source§fn eq(&self, other: &RequestTrace) -> bool
fn eq(&self, other: &RequestTrace) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for RequestTrace
Auto Trait Implementations§
impl Freeze for RequestTrace
impl RefUnwindSafe for RequestTrace
impl Send for RequestTrace
impl Sync for RequestTrace
impl Unpin for RequestTrace
impl UnsafeUnpin for RequestTrace
impl UnwindSafe for RequestTrace
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