[−][src]Struct opentelemetry::global::GlobalTracer
GlobalTracer maintains a global singleton that allows any thread to access
the same generic Tracer
implementation.
Trait Implementations
impl Tracer for GlobalTracer
[src]
type Span = BoxedSpan
Global tracer uses BoxedSpan
s so that it can be a global singleton,
which is not possible if it takes generic type parameters.
fn invalid(&self) -> Self::Span
[src]
Returns a span with an invalid SpanContext
.
fn start(
&self,
name: &'static str,
parent_span: Option<SpanContext>
) -> Self::Span
[src]
&self,
name: &'static str,
parent_span: Option<SpanContext>
) -> Self::Span
Starts a new Span
.
fn get_active_span(&self) -> Self::Span
[src]
Returns the current active span.
fn mark_span_as_active(&self, span: &Self::Span)
[src]
Mark a given Span
as active.
fn mark_span_as_inactive(&self, span_id: u64)
[src]
Mark a given Span
as inactive.
Auto Trait Implementations
impl Send for GlobalTracer
impl Sync for GlobalTracer
impl Unpin for GlobalTracer
impl !UnwindSafe for GlobalTracer
impl !RefUnwindSafe for GlobalTracer
Blanket Implementations
impl<S> TracerGenerics for S where
S: Tracer,
[src]
S: Tracer,
fn with_span<T, F>(&Self, &'static str, F) -> T where
F: FnOnce() -> T,
[src]
F: FnOnce() -> T,
Wraps the execution of the function body with a span. It starts a new span and sets it as the active span for the given function. It then executes the body. It closes the span before returning the execution result.
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,