pub struct TraceContext {
pub traceparent: String,
pub tracestate: Option<String>,
}Expand description
W3C Trace Context propagated with a command lease.
The values are kept in their standard wire form so receivers can attach them to handler telemetry without inventing separate trace/span fields.
JSON schema
{
"description": "W3C Trace Context propagated with a command lease.\n\nThe values are kept in their standard wire form so receivers can attach\nthem to handler telemetry without inventing separate trace/span fields.",
"type": "object",
"required": [
"traceparent"
],
"properties": {
"traceparent": {
"description": "W3C `traceparent` header value.",
"type": "string"
},
"tracestate": {
"description": "Optional W3C `tracestate` header value.",
"type": [
"string",
"null"
]
}
}
}Fields§
§traceparent: StringW3C traceparent header value.
tracestate: Option<String>Optional W3C tracestate header value.
Implementations§
Source§impl TraceContext
impl TraceContext
pub fn builder() -> TraceContext
Trait Implementations§
Source§impl Clone for TraceContext
impl Clone for TraceContext
Source§fn clone(&self) -> TraceContext
fn clone(&self) -> TraceContext
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 TraceContext
impl Debug for TraceContext
Source§impl<'de> Deserialize<'de> for TraceContext
impl<'de> Deserialize<'de> for TraceContext
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 From<&TraceContext> for TraceContext
impl From<&TraceContext> for TraceContext
Source§fn from(value: &TraceContext) -> Self
fn from(value: &TraceContext) -> Self
Converts to this type from the input type.
Source§impl From<TraceContext> for TraceContext
impl From<TraceContext> for TraceContext
Source§fn from(value: TraceContext) -> Self
fn from(value: TraceContext) -> Self
Converts to this type from the input type.
Source§impl Serialize for TraceContext
impl Serialize for TraceContext
Source§impl TryFrom<TraceContext> for TraceContext
impl TryFrom<TraceContext> for TraceContext
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§fn try_from(value: TraceContext) -> Result<Self, ConversionError>
fn try_from(value: TraceContext) -> Result<Self, ConversionError>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for TraceContext
impl RefUnwindSafe for TraceContext
impl Send for TraceContext
impl Sync for TraceContext
impl Unpin for TraceContext
impl UnsafeUnpin for TraceContext
impl UnwindSafe for TraceContext
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