[−][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 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]
&self,
operation_name: N,
f: F
) -> RjSpan where
F: FnOnce(StartSpanOptions<AllSampler, SpanContextState>) -> RjSpan,
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]
&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 Borrow<Span<SpanContextState>> for HSpan
[src]
impl BorrowMut<Span<SpanContextState>> for HSpan
[src]
fn borrow_mut(&mut self) -> &mut RjSpan
[src]
impl Debug for HSpan
[src]
impl Deref for HSpan
[src]
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]
T: 'static + ?Sized,
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> From<T> for T
[src]
impl<F> Instrument for F
[src]
fn instrument<S>(self, span: S) -> Instrumented<Self, S> where
S: Span,
[src]
S: Span,
fn in_active_span<T>(self, tracer: T) -> Instrumented<Self, <T as Tracer>::Span> where
T: Tracer,
[src]
T: Tracer,
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 = Infallible
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<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,