pub struct RequestSpan { /* private fields */ }Expand description
Request span for tracking HTTP/RPC requests
Implementations§
Source§impl RequestSpan
impl RequestSpan
Sourcepub fn request_id(&self) -> &str
pub fn request_id(&self) -> &str
Get the request ID
Sourcepub fn set_attribute(
&mut self,
key: impl Into<String>,
value: impl Into<SpanValue>,
)
pub fn set_attribute( &mut self, key: impl Into<String>, value: impl Into<SpanValue>, )
Set an attribute
Sourcepub fn finish_with_error(self, error: impl Into<String>) -> Span
pub fn finish_with_error(self, error: impl Into<String>) -> Span
Finish the span with an error
Auto Trait Implementations§
impl Freeze for RequestSpan
impl RefUnwindSafe for RequestSpan
impl Send for RequestSpan
impl Sync for RequestSpan
impl Unpin for RequestSpan
impl UnsafeUnpin for RequestSpan
impl UnwindSafe for RequestSpan
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