Struct zipkin::span::Builder
[−]
[src]
pub struct Builder { /* fields omitted */ }
A builder for Span
s.
Methods
impl Builder
[src]
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 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
.
[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.
[src]
As multiple tags to the span.
pub fn build(&self, trace_id: TraceId, id: SpanId) -> Span
[src]
Constructs a Span
.