pub struct DatadogHeaders;Expand description
Datadog-specific header strategy for HeaderMap.
This uses the various x-datadog- headers.
use tracing_datadog::{
context::{DatadogContext, TraceContextExt, TracingContextExt},
http::DatadogHeaders,
};
let mut headers = HeaderMap::new();
let current_span = tracing::Span::current();
// Extract W3C headers and set the context on the current span.
current_span.set_context(headers.extract_trace_context::<DatadogHeaders>());
// Set the current span's context as W3C headers.
headers.inject_trace_context::<DatadogHeaders>(current_span.get_context());Trait Implementations§
Auto Trait Implementations§
impl Freeze for DatadogHeaders
impl RefUnwindSafe for DatadogHeaders
impl Send for DatadogHeaders
impl Sync for DatadogHeaders
impl Unpin for DatadogHeaders
impl UnwindSafe for DatadogHeaders
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