pub struct SpanFactory { /* private fields */ }Expand description
Span factory for creating consistent spans across the client.
Implementations§
Source§impl SpanFactory
impl SpanFactory
Sourcepub fn new(config: TracingConfig) -> Self
pub fn new(config: TracingConfig) -> Self
Create a new span factory with the given configuration.
Sourcepub fn create_span(&self, method: &str, endpoint: &str) -> TalosSpan
pub fn create_span(&self, method: &str, endpoint: &str) -> TalosSpan
Create a span for a Talos API call.
Sourcepub fn create_etcd_span(&self, method: &str, endpoint: &str) -> TalosSpan
pub fn create_etcd_span(&self, method: &str, endpoint: &str) -> TalosSpan
Create a span for an etcd API call.
Sourcepub fn config(&self) -> &TracingConfig
pub fn config(&self) -> &TracingConfig
Get the configuration.
Trait Implementations§
Source§impl Clone for SpanFactory
impl Clone for SpanFactory
Source§fn clone(&self) -> SpanFactory
fn clone(&self) -> SpanFactory
Returns a duplicate 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 SpanFactory
impl Debug for SpanFactory
Auto Trait Implementations§
impl Freeze for SpanFactory
impl RefUnwindSafe for SpanFactory
impl Send for SpanFactory
impl Sync for SpanFactory
impl Unpin for SpanFactory
impl UnwindSafe for SpanFactory
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