fn init_tracing_stdout() {
    let fmt_layer = Layer::default()
        .with_thread_ids(true)
        .with_thread_names(true)
        // .pretty()
        .with_ansi(false)
        .with_span_events(fmt::format::FmtSpan::FULL);

    let subscriber = Registry::default()
        .with(EnvFilter::from_default_env())
        .with(fmt_layer)
        .with(jaeger_layer());

    tracing::subscriber::set_global_default(subscriber)
        .expect("error setting global tracing subscriber");
}
/// Init logging and tracing.
///
/// To enable reporting tracing data to jaeger, set env var `FUSE_JAEGER` to non-empty value.
/// A local tracing collection(maybe for testing) can be done with a local jaeger server.
/// To report tracing data and view it:
///   docker run -d -p6831:6831/udp -p6832:6832/udp -p16686:16686 jaegertracing/all-in-one:latest
///   FUSE_JAEGER=on RUST_LOG=trace cargo test
///   open http://localhost:16686/
///
/// To adjust batch sending delay, use `OTEL_BSP_SCHEDULE_DELAY`:
///   FUSE_JAEGER=on RUST_LOG=trace OTEL_BSP_SCHEDULE_DELAY=1 cargo test
///
// TODO(xp): use FUSE_JAEGER to assign jaeger server address.
Init logging and tracing.
To enable reporting tracing data to jaeger, set env var `FUSE_JAEGER` to non-empty value.
A local tracing collection(maybe for testing) can be done with a local jaeger server.



use FUSE_JAEGER to assign jaeger server address.
Init logging and tracing . To enable reporting tracing data to jaeger set env var ` FUSE_JAEGER ` to non - empty value . A local tracing collection ( maybe for testing ) can be done with a local jaeger server . use FUSE_JAEGER to assign jaeger server address .
fn init_tracing_stdout() {
    let fmt_layer = Layer::default()
        .with_thread_ids(true)
        .with_thread_names(true)
        // .pretty()
        .with_ansi(false)
        .with_span_events(fmt::format::FmtSpan::FULL);
    let subscriber = Registry::default()
        .with(EnvFilter::from_default_env())
        .with(fmt_layer)
        .with(jaeger_layer());
    tracing::subscriber::set_global_default(subscriber)
        .expect("error setting global tracing subscriber");
}
fn init_tracing_stdout ( ) { let fmt_layer = Layer :: default ( ) . with_thread_ids ( true ) . with_thread_names ( true ) // .pretty() . with_ansi ( false ) . with_span_events ( fmt :: format :: FmtSpan :: FULL ) ; let subscriber = Registry :: default ( ) . with ( EnvFilter :: from_default_env ( ) ) . with ( fmt_layer ) . with ( jaeger_layer ( ) ) ; tracing :: subscriber :: set_global_default ( subscriber ) . expect ( " " ) ; }
Init logging and tracing.
Init logging and tracing .