Skip to content

Commit 2016ffe

Browse files
committed
fix: surface invalid regex filter patterns as warnings at startup
1 parent d0743b0 commit 2016ffe

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

bottlecap/src/traces/trace_processor.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ use std::sync::Arc;
3030
use tokio::sync::Mutex;
3131
use tokio::sync::mpsc::Sender;
3232
use tokio::sync::mpsc::error::SendError;
33-
use tracing::{debug, error};
33+
use tracing::{debug, error, warn};
3434

3535
use crate::traces::stats_generator::StatsGenerator;
3636
use crate::traces::trace_aggregator::{OwnedTracerHeaderTags, SendDataBuilderInfo};
@@ -122,7 +122,7 @@ fn compile_regex_filters(filters: Option<&[String]>) -> Vec<RegexFilter> {
122122
regex: Some(regex),
123123
})
124124
} else {
125-
debug!(
125+
warn!(
126126
"TRACE_PROCESSOR | Invalid regex pattern '{}' for key '{}', skipping filter",
127127
pattern.trim(),
128128
key.trim()
@@ -868,7 +868,6 @@ mod tests {
868868
"service",
869869
&Regex::new(r"api-.*").expect("regex pattern should be valid")
870870
));
871-
872871
}
873872

874873
#[test]

0 commit comments

Comments
 (0)