Struct mz_ore::tracing::OpenTelemetryContext
source · pub struct OpenTelemetryContext { /* private fields */ }
Available on crate feature
tracing_
only.Expand description
An OpenTelemetry context.
Allows associating tracing
spans across task or thread boundaries.
Implementations§
source§impl OpenTelemetryContext
impl OpenTelemetryContext
sourcepub fn attach_as_parent(&self)
pub fn attach_as_parent(&self)
Attaches this Context
to the current tracing
span,
as its parent.
If there is not enough information in this OpenTelemetryContext
to create a context, then the current thread’s Context
is used
defaulting to the default Context
.
Trait Implementations§
source§impl Clone for OpenTelemetryContext
impl Clone for OpenTelemetryContext
source§fn clone(&self) -> OpenTelemetryContext
fn clone(&self) -> OpenTelemetryContext
Returns a copy 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 OpenTelemetryContext
impl Debug for OpenTelemetryContext
source§impl<'de> Deserialize<'de> for OpenTelemetryContext
impl<'de> Deserialize<'de> for OpenTelemetryContext
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Extractor for OpenTelemetryContext
impl Extractor for OpenTelemetryContext
source§impl From<OpenTelemetryContext> for BTreeMap<String, String>
impl From<OpenTelemetryContext> for BTreeMap<String, String>
source§fn from(ctx: OpenTelemetryContext) -> Self
fn from(ctx: OpenTelemetryContext) -> Self
Converts to this type from the input type.
source§impl Injector for OpenTelemetryContext
impl Injector for OpenTelemetryContext
source§impl PartialEq<OpenTelemetryContext> for OpenTelemetryContext
impl PartialEq<OpenTelemetryContext> for OpenTelemetryContext
source§fn eq(&self, other: &OpenTelemetryContext) -> bool
fn eq(&self, other: &OpenTelemetryContext) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for OpenTelemetryContext
impl Serialize for OpenTelemetryContext
impl StructuralPartialEq for OpenTelemetryContext
Auto Trait Implementations§
impl RefUnwindSafe for OpenTelemetryContext
impl Send for OpenTelemetryContext
impl Sync for OpenTelemetryContext
impl Unpin for OpenTelemetryContext
impl UnwindSafe for OpenTelemetryContext
Blanket Implementations§
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