Struct sentry_core::Span
source · [−]pub struct Span { /* private fields */ }
Expand description
A running Performance Monitoring Span.
The span needs to be explicitly finished via Span::finish
, otherwise it
will not be sent to Sentry.
Implementations
sourceimpl Span
impl Span
sourcepub fn set_data(&self, key: &str, value: Value)
pub fn set_data(&self, key: &str, value: Value)
Set some extra information to be sent with this Transaction.
sourcepub fn get_status(&self) -> Option<SpanStatus>
pub fn get_status(&self) -> Option<SpanStatus>
Get the status of the Span.
sourcepub fn set_status(&self, status: SpanStatus)
pub fn set_status(&self, status: SpanStatus)
Set the status of the Span.
sourcepub fn set_request(&self, request: Request)
pub fn set_request(&self, request: Request)
Set the HTTP request information for this Span.
sourcepub fn iter_headers(&self) -> TraceHeadersIterⓘNotable traits for TraceHeadersIterimpl Iterator for TraceHeadersIter type Item = (&'static str, String);
pub fn iter_headers(&self) -> TraceHeadersIterⓘNotable traits for TraceHeadersIterimpl Iterator for TraceHeadersIter type Item = (&'static str, String);
Returns the headers needed for distributed tracing.
sourcepub fn finish(self)
pub fn finish(self)
Finishes the Span.
This will record the end timestamp and add the span to the transaction in which it was started.
sourcepub fn start_child(&self, op: &str, description: &str) -> Span
pub fn start_child(&self, op: &str, description: &str) -> Span
Starts a new child Span with the given op
and description
.
The span must be explicitly finished via Span::finish
.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Span
impl Send for Span
impl Sync for Span
impl Unpin for Span
impl UnwindSafe for Span
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more