Struct rustracing::span::Span[][src]

pub struct Span<T>(_);

Span.

When this span is dropped, it will be converted to FinishedSpan and it will be sent to the associated SpanReceiver.

Methods

impl<T> Span<T>
[src]

Makes an inactive span.

This span is never traced.

Examples

use rustracing::span::Span;

let span = Span::<()>::inactive();
assert!(! span.is_sampled());

Returns a handle of this span.

Returns true if this span is sampled (i.e., being traced).

Returns the context of this span.

Sets the operation name of this span.

Sets the finish time of this span.

Sets the tag to this span.

Sets the tags to this span.

Sets the baggage item to this span.

Gets the baggage item that has the name name.

Logs structured data.

Logs an error.

This is a simple wrapper of log method except that the StdTag::error() tag will be set in this method.

Starts a ChildOf span if this span is sampled.

Starts a FollowsFrom span if this span is sampled.

Trait Implementations

impl<T: Debug> Debug for Span<T>
[src]

Formats the value using the given formatter. Read more

impl<T> Drop for Span<T>
[src]

Executes the destructor for this type. Read more

impl<T> MaybeAsRef<SpanContext<T>> for Span<T>
[src]

Performs the conversion.

Auto Trait Implementations

impl<T> Send for Span<T> where
    T: Send

impl<T> !Sync for Span<T>