Skip to content

Commit

Permalink
chore(internal_logs source): rate limit internal logs (vectordotdev#1…
Browse files Browse the repository at this point in the history
  • Loading branch information
tobz authored Jun 15, 2022
1 parent 7cdb9c0 commit 63138de
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 63138de

Please sign in to comment.