diff --git a/agent/src/flow_generator/flow_map.rs b/agent/src/flow_generator/flow_map.rs index dde431c0fca..3bb2e07b39f 100644 --- a/agent/src/flow_generator/flow_map.rs +++ b/agent/src/flow_generator/flow_map.rs @@ -290,7 +290,10 @@ impl FlowMap { stats_collector.register_countable( "allocator", Countable::Ref(allocator.counter()), - vec![StatsOption::Tag("type", "TaggedFlow".to_owned())], + vec![ + StatsOption::Tag("type", "TaggedFlow".to_owned()), + StatsOption::Tag("id", format!("{}", id)), + ], ); allocator }, @@ -300,7 +303,10 @@ impl FlowMap { stats_collector.register_countable( "allocator", Countable::Ref(allocator.counter()), - vec![StatsOption::Tag("type", "L7Stats".to_owned())], + vec![ + StatsOption::Tag("type", "L7Stats".to_owned()), + StatsOption::Tag("id", format!("{}", id)), + ], ); allocator }, diff --git a/agent/src/utils/stats.rs b/agent/src/utils/stats.rs index b8c3793bbff..9e292334235 100644 --- a/agent/src/utils/stats.rs +++ b/agent/src/utils/stats.rs @@ -236,7 +236,7 @@ impl Collector { let equals = s == &source; if !closed && equals { warn!( - "Possible memory leak! countable {} is not correctly closed.", + "Found duplicated counter source {}, please check if the old one is correctly closed.", source ); }