[][src]Struct holochain_tracing::Span

pub struct Span(pub RjSpan);

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 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_<N: Into<Cow<'static, str>>, F>(
    &self,
    operation_name: N,
    f: F
) -> RjSpan where
    F: FnOnce(StartSpanOptions<AllSampler, SpanContextState>) -> RjSpan
[src]

Renaming of underlying child method

pub fn follower_<N: Into<Cow<'static, str>>, F>(
    &self,
    operation_name: N,
    f: F
) -> RjSpan where
    F: FnOnce(StartSpanOptions<AllSampler, SpanContextState>) -> RjSpan
[src]

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 Borrow<Span<SpanContextState>> for HSpan[src]

impl BorrowMut<Span<SpanContextState>> for HSpan[src]

impl Debug for HSpan[src]

impl Deref for HSpan[src]

type Target = RjSpan

The resulting type after dereferencing.

impl DerefMut for HSpan[src]

impl From<Span<SpanContextState>> for HSpan[src]

Auto Trait Implementations

impl RefUnwindSafe for HSpan

impl Send for HSpan

impl Sync for HSpan

impl Unpin for HSpan

impl UnwindSafe for HSpan

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<F> Instrument for F[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,