pub fn start_tracing(&self, latencies: prometheus::HistogramVec) -> Result<()> {
        let fmt_layer: LogOutputLayer<_> = self.fmt.into();
        let err_layer = tracing_error::ErrorLayer::default();

        let subscriber = tracing_subscriber::Registry::default()
            .with(TimeSpanLifetime::new(latencies))
            .with(self.level.to_filter())
            .with(fmt_layer)
            .with(err_layer);

        match self.jaeger {
            None => match self.zipkin {
                None => subscriber.try_init()?,
                Some(ref zipkin) => {
                    let layer: OpenTelemetryLayer<_, _> = zipkin.try_into_layer()?;
                    subscriber.with(layer).try_init()?
                }
            },
            Some(ref jaeger) => {
                let layer: OpenTelemetryLayer<_, _> = jaeger.try_into_layer()?;
                subscriber.with(layer).try_init()?
            }
        }

        Ok(())
    }
/// Attempt to instantiate and register a tracing subscriber setup from settings.
Attempt to instantiate and register a tracing subscriber setup from settings.
Attempt to instantiate and register a tracing subscriber setup from settings .
pub fn start_tracing(&self, latencies: prometheus::HistogramVec) -> Result<()> {
        let fmt_layer: LogOutputLayer<_> = self.fmt.into();
        let err_layer = tracing_error::ErrorLayer::default();
        let subscriber = tracing_subscriber::Registry::default()
            .with(TimeSpanLifetime::new(latencies))
            .with(self.level.to_filter())
            .with(fmt_layer)
            .with(err_layer);
        match self.jaeger {
            None => match self.zipkin {
                None => subscriber.try_init()?,
                Some(ref zipkin) => {
                    let layer: OpenTelemetryLayer<_, _> = zipkin.try_into_layer()?;
                    subscriber.with(layer).try_init()?
                }
            },
            Some(ref jaeger) => {
                let layer: OpenTelemetryLayer<_, _> = jaeger.try_into_layer()?;
                subscriber.with(layer).try_init()?
            }
        }
        Ok(())
    }
pub fn start_tracing ( & self , latencies : prometheus :: HistogramVec ) -> Result < ( ) > { let fmt_layer : LogOutputLayer < _ > = self . fmt . into ( ) ; let err_layer = tracing_error :: ErrorLayer :: default ( ) ; let subscriber = tracing_subscriber :: Registry :: default ( ) . with ( TimeSpanLifetime :: new ( latencies ) ) . with ( self . level . to_filter ( ) ) . with ( fmt_layer ) . with ( err_layer ) ; match self . jaeger { None => match self . zipkin { None => subscriber . try_init ( ) ? , Some ( ref zipkin ) => { let layer : OpenTelemetryLayer < _ , _ > = zipkin . try_into_layer ( ) ? ; subscriber . with ( layer ) . try_init ( ) ? } } , Some ( ref jaeger ) => { let layer : OpenTelemetryLayer < _ , _ > = jaeger . try_into_layer ( ) ? ; subscriber . with ( layer ) . try_init ( ) ? } } Ok ( ( ) ) }
Attempt to instantiate and register a tracing subscriber setup from settings.
Attempt to instantiate and register a tracing subscriber setup from settings .
&self
latencies
prometheus::HistogramVec
&self
latencies
prometheus::HistogramVec