Repository navigation
🐛 Count only error-level lines in log error bursts - #627
Merged
Merged
Conversation
abahmed
force-pushed
the
fix-log-burst-levels
branch
from
November 24, 2026 22:54
2e2cd9a to
dedc295
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Log sampling counted any line containing words like error, denied, failed or timeout, whatever its level, so info lines such as
level=info msg="reconcile ok" error=nullfed LogErrorBurst. A quiet workload also had a baseline floor of 1, so any jump to 20 lines passed the 5x test.Matcher (
kube.IsSampledErrorLine, used only by the log sampler):level=/lvl=/severity=, JSONlevel/severity/lvl, klogI/W/E/Fprefix, upper-caseINFO/ERRORtokens at line start, after a timestamp or in brackets) counts only at error, err, fatal, panic, critical, alert or emerg. Info, debug, trace, notice and warn do not count.error=null,error=<nil>,err=nil,"error":null,"error":"").IsErrorLineis unchanged. Other callers (crash first-error line, firstError, ErrorExcerpt, investigate pod checks) are about crash evidence and keep it.Floor: the factor is now applied to max(rate, 8) instead of max(rate, 1), so a quiet service needs 40 lines in a window. ErrorBurstFloor stays 20.
Docs:
investigation.sampleLogsrow updated, withreasons: ["!LogErrorBurst"]and silences as the way to mute only this finding (Pro).Tests: matcher table test, a sampler round test with info noise, and baseline-floor detector cases. Only affected packages run locally; CI runs the full suite.