Trait HasOtelContext

Source
pub trait HasOtelContext {
    // Required method
    fn get_otel_context(&self) -> Option<&ExtractedOtelContext>;
}
Expand description

Trait for request types that can provide access to extracted OpenTelemetry context.

This trait abstracts over http::Request and tonic::Request to allow generic functions that work with either request type.

Required Methods§

Implementations on Foreign Types§

Source§

impl<B> HasOtelContext for Request<B>

Source§

impl<T> HasOtelContext for Request<T>

Implementors§