From febb96e3bfa8163614e946905cb42aec181b1e83 Mon Sep 17 00:00:00 2001 From: Syfaro Date: Tue, 15 Aug 2023 15:20:37 -0400 Subject: [PATCH] Better dump logging. --- bkapi/src/main.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bkapi/src/main.rs b/bkapi/src/main.rs index 17bbf68..edce773 100644 --- a/bkapi/src/main.rs +++ b/bkapi/src/main.rs @@ -415,9 +415,13 @@ async fn handle_search_nats( #[get("/dump")] async fn dump(tree: Data) -> HttpResponse { + tracing::info!("starting dump request"); let (wtr, rdr) = tokio::io::duplex(4096); + let span = tracing::info_span!("dump_blocking"); tokio::task::spawn_blocking(move || { + let _entered = span.entered(); + let tree = tree.tree.blocking_read(); let bridge = tokio_util::io::SyncIoBridge::new(wtr);