pub struct SpanBuilder { /* private fields */ }
Expand description
Span builder for creating spans with configuration
Implementations§
Source§impl SpanBuilder
impl SpanBuilder
Sourcepub fn with_attribute(self, key: &str, value: &str) -> Self
pub fn with_attribute(self, key: &str, value: &str) -> Self
Add an attribute
Sourcepub fn with_parent(self, context: TraceContext) -> Self
pub fn with_parent(self, context: TraceContext) -> Self
Set parent context
Sourcepub fn with_component(self, component: &str) -> Self
pub fn with_component(self, component: &str) -> Self
Set component name
Sourcepub fn start(
self,
tracingsystem: &TracingSystem,
) -> Result<ActiveSpan, CoreError>
pub fn start( self, tracingsystem: &TracingSystem, ) -> Result<ActiveSpan, CoreError>
Auto Trait Implementations§
impl Freeze for SpanBuilder
impl RefUnwindSafe for SpanBuilder
impl Send for SpanBuilder
impl Sync for SpanBuilder
impl Unpin for SpanBuilder
impl UnwindSafe for SpanBuilder
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more