pub trait TraceBridge: Send + Sync {
// Required methods
fn set_parent(&self, span: &Span, parent: Option<&TraceContext>);
fn add_link(&self, span: &Span, context: &TraceContext);
fn context(&self, span: &Span) -> Option<TraceContext>;
}Expand description
Connect existing instrumentation to a context provider without exposing its SDK.
Set a parent and links before reading/materializing a span’s context. None
explicitly starts a root, independently of any ambient transport span.
Hooks must be nonblocking and nonpanicking; returned carriers must validate.
Never perform export I/O here: allocation hooks may run inside a transaction.
Required Methods§
fn set_parent(&self, span: &Span, parent: Option<&TraceContext>)
fn add_link(&self, span: &Span, context: &TraceContext)
fn context(&self, span: &Span) -> Option<TraceContext>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".