Skip to content

Commit 93949fd

Browse files
author
Devdutt Shenoi
committed
note span creation and deletion
1 parent 445acd7 commit 93949fd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,14 @@ use parseable::{
2121
option::{Mode, CONFIG},
2222
rbac, storage, IngestServer, ParseableServer, QueryServer, Server,
2323
};
24-
use tracing_subscriber::EnvFilter;
24+
use tracing_subscriber::{fmt::format::FmtSpan, EnvFilter};
2525

2626
#[actix_web::main]
2727
async fn main() -> anyhow::Result<()> {
2828
tracing_subscriber::fmt()
2929
.with_env_filter(EnvFilter::from_default_env())
30+
.with_span_events(FmtSpan::NEW) // logs when a span is created
31+
.with_span_events(FmtSpan::CLOSE) // logs when a span is destructed
3032
.compact()
3133
.init();
3234

0 commit comments

Comments
 (0)