[−][src]Struct zipkin::span::Builder
A builder for Span
s.
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]
I: IntoIterator<Item = Annotation>,
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]
I: IntoIterator<Item = (String, String)>,
As multiple tags to the span.
pub fn build(&self) -> Span
[src]
Trait Implementations
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]
U: From<T>,
impl<T> From<T> for T
[src]
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<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,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,