Struct opentelemetry::global::BoxedSpan[][src]

pub struct BoxedSpan(_);

Wraps the BoxedTracer’s Span so it can be used generically by applications without knowing the underlying type.

Trait Implementations

impl Debug for BoxedSpan[src]

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

Formats the value using the given formatter. Read more

impl Span for BoxedSpan[src]

fn add_event_with_timestamp(
    &mut self,
    name: String,
    timestamp: SystemTime,
    attributes: Vec<KeyValue>
)
[src]

This is supported on crate feature trace only.

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 span_context(&self) -> &SpanContext[src]

This is supported on crate feature trace only.

Returns the SpanContext for the given Span.

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

This is supported on crate feature trace only.

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(&mut self, attribute: KeyValue)[src]

This is supported on crate feature trace only.

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(&mut self, code: StatusCode, message: String)[src]

This is supported on crate feature trace only.

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

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

This is supported on crate feature trace only.

Updates the Span’s name.

fn end_with_timestamp(&mut self, timestamp: SystemTime)[src]

This is supported on crate feature trace only.

Finishes the span with given timestamp.

fn add_event(&mut self, name: String, attributes: Vec<KeyValue>)[src]

This is supported on crate feature trace only.

An API to record events in the context of a given Span. Read more

fn record_exception(&mut self, err: &dyn Error)[src]

This is supported on crate feature trace only.

Convenience method to record an exception/error as an Event Read more

fn record_exception_with_stacktrace(
    &mut self,
    err: &dyn Error,
    stacktrace: String
)
[src]

This is supported on crate feature trace only.

Convenience method to record a exception/error as an Event with custom stacktrace Read more

fn end(&mut self)[src]

This is supported on crate feature trace only.

Finishes the Span. Read more

Auto Trait Implementations

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

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.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

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

pub fn vzip(self) -> V