pub fn push_tcp_instrument<T, I, G, NSvc>(self, mk_span: G) -> Outbound<svc::ArcNewTcp<T, I>>
    where
        T: svc::Param<OrigDstAddr> + Clone + Send + 'static,
        G: svc::GetSpan<T> + Clone + Send + Sync + 'static,
        I: io::AsyncRead + io::AsyncWrite + io::PeerAddr + std::fmt::Debug + Send + Unpin + 'static,
        N: svc::NewService<Accept, Service = NSvc> + Clone + Send + Sync + 'static,
        NSvc: svc::Service<metrics::SensorIo<I>, Response = (), Error = Error> + Send + 'static,
        NSvc::Future: Send,
    {
        self.map_stack(|_, rt, inner| {
            inner
                .push(metrics::NewServer::layer(
                    rt.metrics.proxy.transport.clone(),
                ))
                .push_request_filter(|t: T| Accept::try_from(t.param()))
                .push(rt.metrics.tcp_errors.to_layer())
                .instrument(mk_span)
                .check_new_service::<T, I>()
                .push_on_service(svc::BoxService::layer())
                .push(svc::ArcNewService::layer())
                .check_new_service::<T, I>()
        })
    }
/// Wraps a TCP accept stack with tracing and metrics instrumentation.
Wraps a TCP accept stack with tracing and metrics instrumentation.
Wraps a TCP accept stack with tracing and metrics instrumentation .
pub fn push_tcp_instrument<T, I, G, NSvc>(self, mk_span: G) -> Outbound<svc::ArcNewTcp<T, I>>
    where
        T: svc::Param<OrigDstAddr> + Clone + Send + 'static,
        G: svc::GetSpan<T> + Clone + Send + Sync + 'static,
        I: io::AsyncRead + io::AsyncWrite + io::PeerAddr + std::fmt::Debug + Send + Unpin + 'static,
        N: svc::NewService<Accept, Service = NSvc> + Clone + Send + Sync + 'static,
        NSvc: svc::Service<metrics::SensorIo<I>, Response = (), Error = Error> + Send + 'static,
        NSvc::Future: Send,
    {
        self.map_stack(|_, rt, inner| {
            inner
                .push(metrics::NewServer::layer(
                    rt.metrics.proxy.transport.clone(),
                ))
                .push_request_filter(|t: T| Accept::try_from(t.param()))
                .push(rt.metrics.tcp_errors.to_layer())
                .instrument(mk_span)
                .check_new_service::<T, I>()
                .push_on_service(svc::BoxService::layer())
                .push(svc::ArcNewService::layer())
                .check_new_service::<T, I>()
        })
    }
pub fn push_tcp_instrument < T , I , G , NSvc > ( self , mk_span : G ) -> Outbound < svc :: ArcNewTcp < T , I > > where T : svc :: Param < OrigDstAddr > + Clone + Send + ' static , G : svc :: GetSpan < T > + Clone + Send + Sync + ' static , I : io :: AsyncRead + io :: AsyncWrite + io :: PeerAddr + std :: fmt :: Debug + Send + Unpin + ' static , N : svc :: NewService < Accept , Service = NSvc > + Clone + Send + Sync + ' static , NSvc : svc :: Service < metrics :: SensorIo < I > , Response = ( ) , Error = Error > + Send + ' static , NSvc :: Future : Send , { self . map_stack ( | _ , rt , inner | { inner . push ( metrics :: NewServer :: layer ( rt . metrics . proxy . transport . clone ( ) , ) ) . push_request_filter ( | t : T | Accept :: try_from ( t . param ( ) ) ) . push ( rt . metrics . tcp_errors . to_layer ( ) ) . instrument ( mk_span ) . check_new_service :: < T , I > ( ) . push_on_service ( svc :: BoxService :: layer ( ) ) . push ( svc :: ArcNewService :: layer ( ) ) . check_new_service :: < T , I > ( ) } ) }
Wraps a TCP accept stack with tracing and metrics instrumentation.
Wraps a TCP accept stack with tracing and metrics instrumentation .
self
mk_span
G