From 616fad2c5d87d52619529c3d56d5d94464e3f7f3 Mon Sep 17 00:00:00 2001 From: Christoffer Martinsson Date: Thu, 23 Oct 2025 12:22:26 +0200 Subject: [PATCH] Phase 1: Implement exact name filtering for service matching Change service matching logic from contains-based to exact equality. Services now match only if service_name == pattern exactly. This is the first step in the systemd collector optimization plan. --- agent/src/collectors/systemd.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/agent/src/collectors/systemd.rs b/agent/src/collectors/systemd.rs index ee17116..61a74b0 100644 --- a/agent/src/collectors/systemd.rs +++ b/agent/src/collectors/systemd.rs @@ -253,7 +253,7 @@ impl SystemdCollector { // Check if this service matches our filter patterns for pattern in service_name_filters { - if service_name.contains(pattern) || pattern.contains(service_name) { + if service_name == pattern { debug!( "INCLUDING service '{}' because it matches pattern '{}'", service_name, pattern