diff --git a/quickwit/quickwit-common/src/lib.rs b/quickwit/quickwit-common/src/lib.rs
index 538855c1c64..46ec9c0401b 100644
--- a/quickwit/quickwit-common/src/lib.rs
+++ b/quickwit/quickwit-common/src/lib.rs
@@ -31,6 +31,7 @@ mod path_hasher;
mod progress;
pub mod pubsub;
pub mod rand;
+pub mod rate_limited_tracing;
pub mod rate_limiter;
pub mod rendezvous_hasher;
pub mod retry;
diff --git a/quickwit/quickwit-common/src/rate_limited_tracing.rs b/quickwit/quickwit-common/src/rate_limited_tracing.rs
new file mode 100644
index 00000000000..0fab23af045
--- /dev/null
+++ b/quickwit/quickwit-common/src/rate_limited_tracing.rs
@@ -0,0 +1,99 @@
+// Copyright (C) 2024 Quickwit, Inc.
+//
+// Quickwit is offered under the AGPL v3.0 and as commercial software.
+// For commercial licensing, contact us at hello@quickwit.io.
+//
+// AGPL:
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Affero General Public License as
+// published by the Free Software Foundation, either version 3 of the
+// License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Affero General Public License for more details.
+//
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see .
+
+#[macro_export]
+macro_rules! rate_limited_tracing {
+ ($log_fn:ident, limit_per_min=$limit:literal, $($args:tt)*) => {{
+ use ::std::sync::atomic::{AtomicU32, Ordering};
+ use ::std::sync::Mutex;
+ use ::std::time::{Instant, Duration};
+
+ static COUNT: AtomicU32 = AtomicU32::new(0);
+ // we can't build an Instant from const context, so we pinitialize with a None
+ static LAST_RESET: Mutex