We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 61aef22 commit 80e0b16Copy full SHA for 80e0b16
crates/telemetry/src/testing.rs
@@ -1,8 +1,14 @@
1
+use tracing_subscriber::fmt::format::FmtSpan;
2
+
3
/// Initializes telemetry integration for libtest environments.
4
pub fn init_test_telemetry() {
5
static ONCE: std::sync::Once = std::sync::Once::new();
6
ONCE.call_once(|| {
- if let Err(err) = tracing_subscriber::fmt().with_test_writer().try_init() {
7
+ if let Err(err) = tracing_subscriber::fmt()
8
+ .with_span_events(FmtSpan::CLOSE)
9
+ .with_test_writer()
10
+ .try_init()
11
+ {
12
eprintln!("init_test_telemetry failed to init global tracing_subscriber: {err:?}");
13
}
14
});
0 commit comments