From f4a814df4e39ff5547a88d4f5d37ae6fe159cc76 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Wed, 13 May 2026 19:35:02 +0300 Subject: refactor: move TraceFilter and tracepoint selector logic out of flags.Config - Add tracepoints.Selector type with ShouldAttach method and ParseSelector constructor, replacing the raw TracepointsToAttach/TracepointsToExclude regex slices on flags.Config. - Add flags.BuildTraceFilter as a standalone function replacing the Config.TraceFilter() method, keeping filter-building logic out of the config struct. - Remove stale ShouldIAttachTracepoint noise-filter entry from Magefile. - Add selector_test.go with full coverage of ParseSelector and ShouldAttach. Co-Authored-By: Claude Sonnet 4.6 --- internal/ior.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'internal/ior.go') diff --git a/internal/ior.go b/internal/ior.go index 433484d..9a60869 100644 --- a/internal/ior.go +++ b/internal/ior.go @@ -367,9 +367,10 @@ func newEventLoopConfig(cfg flags.Config) eventLoopConfig { } } -// traceFilterFromConfig delegates to the canonical Config.TraceFilter method. +// traceFilterFromConfig delegates to flags.BuildTraceFilter to resolve the +// active event filter from the CLI configuration fields. func traceFilterFromConfig(cfg flags.Config) globalfilter.Filter { - return cfg.TraceFilter() + return flags.BuildTraceFilter(cfg) } func newLogger(verbose bool) func(...any) { -- cgit v1.2.3