Skip to content

Commit

Permalink
chore(internal_logs source): rate limit internal logs (#13154)
Browse files Browse the repository at this point in the history
  • Loading branch information
tobz authored and jszwedko committed Jun 15, 2022
1 parent d460af5 commit b1f7f56
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/trace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,12 @@ pub fn init(color: bool, json: bool, levels: &str) {
let metrics_layer = metrics_layer_enabled()
.then(|| MetricsLayer::new().with_filter(tracing_subscriber::filter::LevelFilter::INFO));

let broadcast_layer =
RateLimitedLayer::new(BroadcastLayer::new()).with_filter(fmt_filter.clone());

let subscriber = tracing_subscriber::registry()
.with(metrics_layer)
.with(BroadcastLayer::new().with_filter(fmt_filter.clone()));
.with(broadcast_layer);

#[cfg(feature = "tokio-console")]
let subscriber = {
Expand Down

0 comments on commit b1f7f56

Please sign in to comment.