pub struct GlideSpan { /* private fields */ }Implementations§
Source§impl GlideSpan
impl GlideSpan
pub fn new(name: &str) -> Self
Sourcepub fn new_with_remote_context(
name: &str,
trace_id_hex: &str,
span_id_hex: &str,
trace_flags: u8,
trace_state: Option<&str>,
) -> Result<Self, GlideOTELError>
pub fn new_with_remote_context( name: &str, trace_id_hex: &str, span_id_hex: &str, trace_flags: u8, trace_state: Option<&str>, ) -> Result<Self, GlideOTELError>
Create a new span as a child of a remote span context identified by raw hex IDs.
Sourcepub fn add_event_with_attributes(
&self,
name: &str,
attributes: &Vec<(&str, &str)>,
)
pub fn add_event_with_attributes( &self, name: &str, attributes: &Vec<(&str, &str)>, )
Attach event with name and attributes to this span.
pub fn set_status(&self, status: GlideSpanStatus)
Sourcepub fn set_attribute(&self, key: &str, value: impl Into<Value>)
pub fn set_attribute(&self, key: &str, value: impl Into<Value>)
Set a string attribute on this span.
Sourcepub fn set_attribute_i64(&self, key: &str, value: i64)
pub fn set_attribute_i64(&self, key: &str, value: i64)
Set an integer attribute on this span.
Sourcepub fn add_span(&self, name: &str) -> Result<GlideSpan, GlideOTELError>
pub fn add_span(&self, name: &str) -> Result<GlideSpan, GlideOTELError>
Add child span to this span and return it
pub fn id(&self) -> String
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GlideSpan
impl RefUnwindSafe for GlideSpan
impl Send for GlideSpan
impl Sync for GlideSpan
impl Unpin for GlideSpan
impl UnsafeUnpin for GlideSpan
impl UnwindSafe for GlideSpan
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> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
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