#[non_exhaustive]pub struct SpanContext {
pub span_name: String,
}Expand description
The context of a span. This is attached to an Exemplar in Distribution values during aggregation.
It contains the name of a span with format:
projects/[PROJECT_ID_OR_NUMBER]/traces/[TRACE_ID]/spans/[SPAN_ID]Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.span_name: StringThe resource name of the span. The format is:
projects/[PROJECT_ID_OR_NUMBER]/traces/[TRACE_ID]/spans/[SPAN_ID][TRACE_ID] is a unique identifier for a trace within a project;
it is a 32-character hexadecimal encoding of a 16-byte array.
[SPAN_ID] is a unique identifier for a span within a trace; it
is a 16-character hexadecimal encoding of an 8-byte array.
Implementations§
Source§impl SpanContext
impl SpanContext
Sourcepub fn set_span_name<T: Into<String>>(self, v: T) -> Self
pub fn set_span_name<T: Into<String>>(self, v: T) -> Self
Sets the value of span_name.
Trait Implementations§
Source§impl Clone for SpanContext
impl Clone for SpanContext
Source§fn clone(&self) -> SpanContext
fn clone(&self) -> SpanContext
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SpanContext
impl Debug for SpanContext
Source§impl Default for SpanContext
impl Default for SpanContext
Source§fn default() -> SpanContext
fn default() -> SpanContext
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for SpanContextwhere
SpanContext: Default,
impl<'de> Deserialize<'de> for SpanContextwhere
SpanContext: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Message for SpanContext
impl Message for SpanContext
Source§impl PartialEq for SpanContext
impl PartialEq for SpanContext
Source§impl Serialize for SpanContext
impl Serialize for SpanContext
impl StructuralPartialEq for SpanContext
Auto Trait Implementations§
impl Freeze for SpanContext
impl RefUnwindSafe for SpanContext
impl Send for SpanContext
impl Sync for SpanContext
impl Unpin for SpanContext
impl UnwindSafe for SpanContext
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more