tracing_log::LogTracer::init().expect("can't init LogTracer");
let subscriber = tracing_subscriber::fmt::Subscriber::default();
tracing::subscriber::set_global_default(subscriber).expect("failed to set");
log::info!("A");
log::debug!("B");
Prints A
but not B
. I don't understand why. There are no filters so it should print everything. Or what am I missing?
rs_tracing
to produce output compatible with about://tracing
in chrome. Is someone working on this for tracing
as well? If not I will. Would it make sense to put is into tracing_subscriber
or make a new crate?
an_zhuo
Idk if I'm just doing something wrong or if that's a bug. Within for_each_concurrent I am calling task::spawn and then creating a span inside the async block
an_zhuo
It's only one span, and the block is pretty short
an_zhuo
But the log ends up with nested spans like span_name:{something}:span_name:{somethingelse}:span_name:{different thing}
an_zhuo
Any idea what could be going on?
Ralith
the RAII guards have no way to know they're in an async context, so they can't properly enter/exit the span on every poll, leading to the behavior you observed
an_zhuo
> <@ralith:ralith.com> the RAII guards have no way to know they're in an async context, so they can't properly enter/exit the span on every poll, leading to the behavior you observed
Thank you so much! I will try that.
Ralith
discord's more active
--no-default-features
to make it only compile in info and higher