[][src]Struct zipkin::span::Builder

pub struct Builder { /* fields omitted */ }

A builder for Spans.

Methods

impl Builder[src]

pub fn trace_id(&mut self, trace_id: TraceId) -> &mut Builder[src]

Sets the trace ID of the span.

pub fn name(&mut self, name: &str) -> &mut Builder[src]

Sets the name of the span.

Defaults to None.

pub fn parent_id(&mut self, parent_id: SpanId) -> &mut Builder[src]

Sets the ID of the span's parent.

Defaults to None.

pub fn id(&mut self, id: SpanId) -> &mut Builder[src]

Sets the ID of the span.

pub fn kind(&mut self, kind: Kind) -> &mut Builder[src]

Sets the kind of the span.

Defaults to None.

pub fn timestamp(&mut self, timestamp: SystemTime) -> &mut Builder[src]

Sets the time of the beginning of the span.

Defaults to None.

pub fn duration(&mut self, duration: Duration) -> &mut Builder[src]

Sets the duration of the span.

Defaults to None.

pub fn debug(&mut self, debug: bool) -> &mut Builder[src]

Sets the debug state of the span.

Defaults to false.

pub fn shared(&mut self, shared: bool) -> &mut Builder[src]

Sets the shared state of the span.

Defaults to false.

pub fn local_endpoint(&mut self, local_endpoint: Endpoint) -> &mut Builder[src]

Sets the local endpoint of the span.

Defaults to None.

pub fn remote_endpoint(&mut self, remote_endpoint: Endpoint) -> &mut Builder[src]

Sets the remote endpoint of the span.

Defaults to None.

pub fn annotation(&mut self, annotation: Annotation) -> &mut Builder[src]

Adds an annotation to the span.

pub fn annotations<I>(&mut self, annotations: I) -> &mut Builder where
    I: IntoIterator<Item = Annotation>, 
[src]

Adds multiple annotations to the span.

pub fn tag(&mut self, key: &str, value: &str) -> &mut Builder[src]

Adds a tag to the span.

pub fn tags<I>(&mut self, tags: I) -> &mut Builder where
    I: IntoIterator<Item = (String, String)>, 
[src]

As multiple tags to the span.

pub fn build(&self) -> Span[src]

Constructs a Span.

Panics

Panics if trace_id or id was not set.

Trait Implementations

impl From<Span> for Builder[src]

Auto Trait Implementations

impl Send for Builder

impl Sync for Builder

impl Unpin for Builder

impl UnwindSafe for Builder

impl RefUnwindSafe for Builder

Blanket Implementations

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

impl<T> From<T> for 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<T> Borrow<T> for T where
    T: ?Sized
[src]

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

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

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