pub struct ObsHttpLayer<B = ()> { /* private fields */ }Expand description
HTTP server-side layer. Spec 40 § 1.
Implementations§
Source§impl<B> ObsHttpLayer<B>
impl<B> ObsHttpLayer<B>
Sourcepub fn server() -> Self
pub fn server() -> Self
Construct a server-side layer with sensible defaults.
emit_started is off; emit_metrics is on.
Sourcepub fn with_route_extractor<F>(self, f: F) -> Self
pub fn with_route_extractor<F>(self, f: F) -> Self
Override the route extractor.
Sourcepub fn with_emit_started(self, on: bool) -> Self
pub fn with_emit_started(self, on: bool) -> Self
Toggle emission of ObsHttpRequestStarted. Default off.
Sourcepub fn with_emit_metrics(self, on: bool) -> Self
pub fn with_emit_metrics(self, on: bool) -> Self
Toggle emission of ObsHttpRequestCompleted metrics fields.
Default on.
Sourcepub fn with_propagator(self, p: W3cPropagator) -> Self
pub fn with_propagator(self, p: W3cPropagator) -> Self
Override the W3C propagator.
Sourcepub fn with_status_classifier<F>(self, f: F) -> Self
pub fn with_status_classifier<F>(self, f: F) -> Self
Override the status classifier.
Trait Implementations§
Source§impl<B> Clone for ObsHttpLayer<B>
impl<B> Clone for ObsHttpLayer<B>
Source§impl<B> Debug for ObsHttpLayer<B>
impl<B> Debug for ObsHttpLayer<B>
Source§impl<S, B> Layer<S> for ObsHttpLayer<B>
impl<S, B> Layer<S> for ObsHttpLayer<B>
Auto Trait Implementations§
impl<B> Freeze for ObsHttpLayer<B>
impl<B = ()> !RefUnwindSafe for ObsHttpLayer<B>
impl<B> Send for ObsHttpLayer<B>
impl<B> Sync for ObsHttpLayer<B>
impl<B> Unpin for ObsHttpLayer<B>
impl<B> UnsafeUnpin for ObsHttpLayer<B>
impl<B = ()> !UnwindSafe for ObsHttpLayer<B>
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