From 5696b5b74b91786ad11543f87b0e8e9521a6a387 Mon Sep 17 00:00:00 2001 From: lstarono Date: Fri, 14 Aug 2026 15:11:19 +0200 Subject: [PATCH] change: error to warning Downgrade kafka errors that contain 'failed to dial' and show in glitchtip as 'error initializing the kafka reader for partition X' to only warnings. This kind of error should stop appearing in glitchtip. --- base/mqueue/mqueue.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/base/mqueue/mqueue.go b/base/mqueue/mqueue.go index 9133c9458..72aa65170 100644 --- a/base/mqueue/mqueue.go +++ b/base/mqueue/mqueue.go @@ -34,8 +34,13 @@ func createLoggerFunc(counter Counter) func(fmt string, args ...interface{}) { fn := func(fmt string, args ...interface{}) { counter.Inc() - utils.LogError("type", "kafka", format.Sprintf(fmt, args...)) - if strings.Contains(fmt, "Group Load In Progress") { + msg := format.Sprintf(fmt, args...) + if strings.Contains(msg, "failed to dial") { + utils.LogWarn("type", "kafka", msg) + } else { + utils.LogError("type", "kafka", msg) + } + if strings.Contains(msg, "Group Load In Progress") { utils.LogPanic("Kafka client stuck detected!!!") } }