[−][src]Struct holochain_tracing::Span
A wrapper around a simple rustracing_jaeger::RjSpan, providing some
convenience functions.
It overshadows the lower-level child
and follower
methods
with simpler versions. To access the lower-level methods, use .0
.
Methods
impl HSpan
[src]
pub fn map<__SHRINKWRAP_T, __SHRINKWRAP_F: FnMut(RjSpan) -> __SHRINKWRAP_T>(
self,
f: __SHRINKWRAP_F
) -> __SHRINKWRAP_T
[src]
self,
f: __SHRINKWRAP_F
) -> __SHRINKWRAP_T
Map a function over the wrapped value, consuming it in the process.
pub fn map_ref<__SHRINKWRAP_T, __SHRINKWRAP_F: FnMut(&RjSpan) -> __SHRINKWRAP_T>(
&self,
f: __SHRINKWRAP_F
) -> __SHRINKWRAP_T
[src]
&self,
f: __SHRINKWRAP_F
) -> __SHRINKWRAP_T
Map a function over the wrapped value without consuming it.
pub fn map_mut<__SHRINKWRAP_T, __SHRINKWRAP_F>(
&mut self,
f: __SHRINKWRAP_F
) -> __SHRINKWRAP_T where
__SHRINKWRAP_F: FnMut(&mut RjSpan) -> __SHRINKWRAP_T,
[src]
&mut self,
f: __SHRINKWRAP_F
) -> __SHRINKWRAP_T where
__SHRINKWRAP_F: FnMut(&mut RjSpan) -> __SHRINKWRAP_T,
Map a function over the wrapped value, potentially changing it in place.
impl HSpan
[src]
pub fn event<S: Into<Cow<'static, str>>>(&mut self, msg: S)
[src]
pub fn error<S: Into<Cow<'static, str>>>(&mut self, kind: S, msg: S)
[src]
pub fn context(&self) -> Option<HSpanContext>
[src]
pub fn child_<'a, N: Into<Cow<'static, str>>, F>(
&'a self,
operation_name: N,
f: F
) -> RjSpan where
F: FnOnce(StartSpanOptions<AllSampler, SpanContextState>) -> RjSpan,
[src]
&'a self,
operation_name: N,
f: F
) -> RjSpan where
F: FnOnce(StartSpanOptions<AllSampler, SpanContextState>) -> RjSpan,
Renaming of underlying child
method
pub fn follower_<'a, N: Into<Cow<'static, str>>, F>(
&'a self,
operation_name: N,
f: F
) -> RjSpan where
F: FnOnce(StartSpanOptions<AllSampler, SpanContextState>) -> RjSpan,
[src]
&'a self,
operation_name: N,
f: F
) -> RjSpan where
F: FnOnce(StartSpanOptions<AllSampler, SpanContextState>) -> RjSpan,
Renaming of underlying follow
method
pub fn child<S: Into<Cow<'static, str>>>(&self, operation_name: S) -> Self
[src]
Call underlying child
method with only a simple operation name
pub fn follower<S: Into<Cow<'static, str>>>(&self, operation_name: S) -> Self
[src]
Call underlying follower
method with only a simple operation name
pub fn wrap<T>(self, data: T) -> SpanWrap<T>
[src]
Wrap this span in a SpanWrap along with some user data
pub fn noop() -> Self
[src]
e.g. for times when a function requires a RjSpan but we don't desire to actually instrument that function call.
pub fn todo(reason: &'static str) -> Self
[src]
Useful for retrofitting existing codebases with traces. This is a noop, but signals intent to eventually hook this up in a meaningful way, perhaps requiring some restructuring of the underlying code to make hookup possible.
pub fn fixme() -> Self
[src]
Like todo(), but lazier. There is no reason why this span can't be hooked up other than lack of programmer time. This signals that it'll be simple to hook up whenever you get around it.
Trait Implementations
impl AsMut<Span<SpanContextState>> for HSpan
[src]
impl AsRef<Span<SpanContextState>> for HSpan
[src]
impl From<Span<SpanContextState>> for HSpan
[src]
impl Deref for HSpan
[src]
impl DerefMut for HSpan
[src]
impl Debug for HSpan
[src]
impl Borrow<Span<SpanContextState>> for HSpan
[src]
impl BorrowMut<Span<SpanContextState>> for HSpan
[src]
fn borrow_mut(&mut self) -> &mut RjSpan
[src]
Auto Trait Implementations
impl Send for HSpan
impl Sync for HSpan
impl Unpin for HSpan
impl UnwindSafe for HSpan
impl RefUnwindSafe for HSpan
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,