[][src]Struct opentelemetry::sdk::trace::Tracer

pub struct Tracer { /* fields omitted */ }
This is supported on crate feature trace only.

Tracer implementation to create and manage spans

Implementations

impl Tracer[src]

pub fn provider(&self) -> Option<TracerProvider>[src]

TracerProvider associated with this tracer.

pub fn instrumentation_library(&self) -> &InstrumentationLibrary[src]

instrumentation library information of this tracer.

Trait Implementations

impl Clone for Tracer[src]

impl Debug for Tracer[src]

pub fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the Tracer using the given formatter. Omitting provider here is necessary to avoid cycles.

impl Tracer for Tracer[src]

type Span = Span

This implementation of Tracer produces sdk::Span instances.

pub fn invalid(&self) -> Self::Span[src]

Returns a span with an inactive SpanContext. Used by functions that need to return a default span like get_active_span if no span is present.

pub fn start_with_context(&self, name: &str, cx: Context) -> Self::Span[src]

Starts a new Span with a given context.

Each span has zero or one parent spans and zero or more child spans, which represent causally related operations. A tree of related spans comprises a trace. A span is said to be a root span if it does not have a parent. Each trace includes a single root span, which is the shared ancestor of all other spans in the trace.

pub fn span_builder(&self, name: &str) -> SpanBuilder[src]

Creates a span builder

An ergonomic way for attributes to be configured before the Span is started.

pub fn build(&self, builder: SpanBuilder) -> Self::Span[src]

Starts a span from a SpanBuilder.

Each span has zero or one parent spans and zero or more child spans, which represent causally related operations. A tree of related spans comprises a trace. A span is said to be a root span if it does not have a parent. Each trace includes a single root span, which is the shared ancestor of all other spans in the trace.

Auto Trait Implementations

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

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

impl<T> IntoRequest<T> for T[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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<V, T> VZip<V> for T where
    V: MultiLane<T>,