pub struct TraceSpan {
pub trace_id: String,
pub span_id: String,
pub display_name: String,
pub start_time: SystemTime,
pub duration: Duration,
pub parent_span_id: Option<String>,
pub attributes: HashMap<String, String>,
pub status: Option<TraceStatus>,
}Expand description
Trace span data for Cloud Trace
Fields§
§trace_id: String§span_id: String§display_name: String§start_time: SystemTime§duration: Duration§parent_span_id: Option<String>§attributes: HashMap<String, String>§status: Option<TraceStatus>Implementations§
Source§impl TraceSpan
impl TraceSpan
pub fn new( trace_id: impl Into<String>, span_id: impl Into<String>, display_name: impl Into<String>, start_time: SystemTime, duration: Duration, ) -> Self
pub fn with_parent_span_id(self, parent_span_id: impl Into<String>) -> Self
pub fn with_attribute( self, key: impl Into<String>, value: impl Into<String>, ) -> Self
pub fn with_status_error(self, message: impl Into<String>) -> Self
pub fn child( &self, name: impl Into<String>, start_time: SystemTime, duration: Duration, ) -> Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TraceSpan
impl RefUnwindSafe for TraceSpan
impl Send for TraceSpan
impl Sync for TraceSpan
impl Unpin for TraceSpan
impl UnwindSafe for TraceSpan
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request