[−][src]Struct opentelemetry::sdk::trace::Span
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,
attributes: Vec<KeyValue>
)
[src]
&self,
name: String,
timestamp: SystemTime,
attributes: Vec<KeyValue>
)
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]
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.
Always returns false after span end
.
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, code: StatusCode, message: String)
[src]
Sets the status of the Span
. If used, this will override the default Span
status, which is Unset
. message
MUST be ignored when the status is OK
or Unset
fn update_name(&self, new_name: String)
[src]
Updates the Span
's name.
fn end_with_timestamp(&self, timestamp: SystemTime)
[src]
Finishes the span with given timestamp.
fn add_event(&self, name: String, attributes: Vec<KeyValue>)
[src]
fn record_exception(&self, err: &dyn Error)
[src]
fn record_exception_with_stacktrace(&self, err: &dyn Error, stacktrace: String)
[src]
fn end(&self)
[src]
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut 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.
pub 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.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src]
V: MultiLane<T>,