[][src]Struct actix_web_opentelemetry::RequestMetrics

pub struct RequestMetrics<M, R, F> where
    M: Meter,
    M::I64Counter: Clone,
    M::F64Measure: Clone,
    R: RouteFormatter,
    F: Fn(&ServiceRequest) -> bool + Send + Clone
{ /* fields omitted */ }

Request metrics tracking

Methods

impl<M, R, F> RequestMetrics<M, R, F> where
    M: Meter,
    M::I64Counter: Clone,
    M::F64Measure: Clone,
    R: RouteFormatter,
    F: Fn(&ServiceRequest) -> bool + Send + Clone
[src]

pub fn new(sdk: M, route_formatter: R, should_render_metrics: Option<F>) -> Self[src]

Create new RequestMetrics

Trait Implementations

impl<M, R, F> Clone for RequestMetrics<M, R, F> where
    M: Meter,
    M::I64Counter: Clone,
    M::F64Measure: Clone,
    R: RouteFormatter + Clone,
    F: Fn(&ServiceRequest) -> bool + Send + Clone
[src]

impl<F> Default for RequestMetrics<NoopMeter, UuidWildcardFormatter, F> where
    F: Fn(&ServiceRequest) -> bool + Send + Clone
[src]

impl<M: Debug, R: Debug, F: Debug> Debug for RequestMetrics<M, R, F> where
    M: Meter,
    M::I64Counter: Clone,
    M::F64Measure: Clone,
    R: RouteFormatter,
    F: Fn(&ServiceRequest) -> bool + Send + Clone,
    M::I64Counter: Debug,
    M::F64Measure: Debug
[src]

impl<S, B, M, R, F> Transform<S> for RequestMetrics<M, R, F> where
    S: Service<Request = ServiceRequest, Response = ServiceResponse<B>, Error = Error>,
    S::Future: 'static,
    B: 'static,
    M: Meter + 'static,
    M::I64Counter: Clone,
    M::F64Measure: Clone,
    R: RouteFormatter + Clone + 'static,
    F: Fn(&ServiceRequest) -> bool + Send + Clone + 'static, 
[src]

type Request = ServiceRequest

Requests handled by the service.

type Response = ServiceResponse<B>

Responses given by the service.

type Error = Error

Errors produced by the service.

type Transform = RequestMetricsMiddleware<S, M, R, F>

The TransformService value created by this factory

type InitError = ()

Errors produced while building a service.

type Future = FutureResult<Self::Transform, Self::InitError>

The future response value.

Auto Trait Implementations

impl<M, R, F> Send for RequestMetrics<M, R, F> where
    M: Send + Sync,
    R: Send,
    <M as Meter>::F64Measure: Send,
    <M as Meter>::I64Counter: Send

impl<M, R, F> Sync for RequestMetrics<M, R, F> where
    F: Sync,
    M: Send + Sync,
    R: Sync,
    <M as Meter>::F64Measure: Sync,
    <M as Meter>::I64Counter: Sync

impl<M, R, F> Unpin for RequestMetrics<M, R, F> where
    F: Unpin,
    R: Unpin,
    <M as Meter>::F64Measure: Unpin,
    <M as Meter>::I64Counter: Unpin

impl<M, R, F> UnwindSafe for RequestMetrics<M, R, F> where
    F: UnwindSafe,
    M: RefUnwindSafe,
    R: UnwindSafe,
    <M as Meter>::F64Measure: UnwindSafe,
    <M as Meter>::I64Counter: UnwindSafe

impl<M, R, F> RefUnwindSafe for RequestMetrics<M, R, F> where
    F: RefUnwindSafe,
    M: RefUnwindSafe,
    R: RefUnwindSafe,
    <M as Meter>::F64Measure: RefUnwindSafe,
    <M as Meter>::I64Counter: RefUnwindSafe

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = !

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T, S> IntoTransform<T, S> for T where
    T: Transform<S>, 

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,