From 48b478c13d12b04368ddf91363d734214adb018c Mon Sep 17 00:00:00 2001 From: Zhiqiang ZHOU Date: Tue, 10 Mar 2026 10:42:23 -0700 Subject: [PATCH] feat: increase Drain tree depth from 4 to 30 Matches Loki's default. Higher depth means the prefix tree routes more precisely, reducing the number of candidate clusters that need similarity comparison at leaf nodes. This improves both accuracy and performance for pattern detection. --- pkg/pattern/drain.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/pattern/drain.go b/pkg/pattern/drain.go index 9539fc8..9ebaa78 100644 --- a/pkg/pattern/drain.go +++ b/pkg/pattern/drain.go @@ -23,7 +23,7 @@ type DrainParser struct { // NewDrainParser creates a DrainParser with default Drain parameters. func NewDrainParser() (*DrainParser, error) { d, err := drain3.NewDrain( - drain3.WithDepth(4), + drain3.WithDepth(30), drain3.WithSimTh(0.4), drain3.WithExtraDelimiter([]string{"|", "=", ","}), )