Struct otlp_embedded::Trace
source · pub struct Trace { /* private fields */ }
Expand description
A trace that consists of multiple spans in a tree structure.
Implementations§
source§impl Trace
impl Trace
sourcepub fn is_complete(&self) -> bool
pub fn is_complete(&self) -> bool
Check if the trace is complete.
sourcepub fn to_tempo_batch(&self) -> Value
pub fn to_tempo_batch(&self) -> Value
Convert the trace into a JSON value that can be directly imported into Grafana Tempo as a batch.
sourcepub fn to_jaeger_batch(&self) -> Value
pub fn to_jaeger_batch(&self) -> Value
Convert the trace into a JSON value that can be directly imported into Jaeger as a batch.
source§impl Trace
impl Trace
sourcepub fn service_name(&self) -> Option<&str>
pub fn service_name(&self) -> Option<&str>
Get the service name of the root span in this trace.
Returns None
if the trace is not complete and the root span is not received.
sourcepub fn service_instance_id(&self) -> Option<&str>
pub fn service_instance_id(&self) -> Option<&str>
Get the service instance ID of the root span in this trace.
Returns None
if the trace is not complete and the root span is not received.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Trace
impl Send for Trace
impl Sync for Trace
impl Unpin for Trace
impl UnwindSafe for Trace
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> 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