Conversation
📝 WalkthroughWalkthroughThe change replaces error logging with Prometheus counter increments in DNS dnstap parsing paths, adds three per-instance counters for parse errors, empty question sections, and invalid question names, and removes an unused loop index in question iteration. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@pkg/runner/runner.go`:
- Around line 1992-1996: The inner loop over msg.Question increments
edm.promInvalidQuestionName but uses a plain continue which only skips to the
next question and not the outer minimiserLoop, so messages with any invalid
question still get processed; change the control flow to skip the entire message
when an invalid question is found — either break out to a labeled continue for
minimiserLoop or set a local flag (e.g., invalidQuestion := true) when
edm.promInvalidQuestionName.Inc() is called and after the for _, question :=
range msg.Question loop check that flag and continue the outer loop
(minimiserLoop) to skip processing msg; update references to msg.Question and
edm.promInvalidQuestionName accordingly.
Keep counters instead of potentially spamming logs. While here fix continue so it targets the correct loop so we skip parsing in that case.
f72f9a6 to
8cf8854
Compare
Keep counters instead of potentially spamming logs.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.