[][src]Struct opentelemetry::sdk::trace::span::Span

pub struct Span { /* fields omitted */ }

Single operation within a trace.

Trait Implementations

impl Clone for Span[src]

impl Debug for Span[src]

impl Span for Span[src]

fn add_event_with_timestamp(&self, name: String, timestamp: SystemTime)[src]

Records events at a specific time in the context of a given Span.

Note that the OpenTelemetry project documents certain "standard event names and keys" which have prescribed semantic meanings.

fn get_context(&self) -> SpanContext[src]

Returns the SpanContext for the given Span.

fn is_recording(&self) -> bool[src]

Returns true if this Span is recording information like events with the add_event operation, attributes using set_attributes, status with set_status, etc.

fn set_attribute(&self, attribute: KeyValue)[src]

Sets a single Attribute where the attribute properties are passed as arguments.

Note that the OpenTelemetry project documents certain "standard attributes" that have prescribed semantic meanings.

fn set_status(&self, status: SpanStatus)[src]

Sets the status of the Span. If used, this will override the default Span status, which is OK.

fn update_name(&self, new_name: String)[src]

Updates the Span's name.

fn end(&self)[src]

Finishes the span.

fn as_any(&self) -> &dyn Any[src]

Returns self as any

fn mark_as_active(&self)[src]

Mark as currently active span.

This is the synchronous api. If you are using futures, you need to use the async api via instrument.

fn mark_as_inactive(&self)[src]

Mark span as inactive

This is the synchronous api. If you are using futures, you need to use the async api via instrument.

Auto Trait Implementations

impl !RefUnwindSafe for Span

impl Send for Span

impl Sync for Span

impl Unpin for Span

impl !UnwindSafe for Span

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<F> Instrument for F[src]

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

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>,