Skip to content

Commit 39f13d0

Browse files
committed
fix: DNS metrics escaped blacklist
1 parent 13e0522 commit 39f13d0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

agent/src/common/l7_protocol_log.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,7 @@ pub struct LogCache {
336336
pub time: u64,
337337
pub resp_status: L7ResponseStatus,
338338

339+
// if `on_blacklist` is true, this `LogCache` should be ignored when calculating perf stats
339340
pub on_blacklist: bool,
340341

341342
// set merged to true when req and resp merge once
@@ -361,6 +362,9 @@ impl LogCache {
361362

362363
impl From<&LogCache> for L7PerfStats {
363364
fn from(cache: &LogCache) -> Self {
365+
if cache.on_blacklist {
366+
return L7PerfStats::default();
367+
}
364368
let (request_count, response_count) = match cache.multi_merge_info.as_ref() {
365369
Some(info) => (
366370
if info.req_end { 1 } else { 0 },

0 commit comments

Comments
 (0)