logging: classify generic http 5xx errors as transient - #812
Merged
Conversation
dberror.Classify only recognized the AWS SDK 5xx shape, so validators.app
503s ("unexpected status code 503") stayed non-transient and every Temporal
retry attempt paged via the solingest logger. The workflow-side escalator
already pages sustained outages at ~15 min; the per-attempt lines are noise.
nikw9944
approved these changes
Aug 30, 2026
nikw9944
left a comment
Contributor
There was a problem hiding this comment.
Two minor points on the classifier, neither blocking: awsRespErrRe's 5xx alternatives are now unreachable and its scoping comment is stale, and the new pattern matches anywhere in the error string, so a 4xx whose body embeds a 5xx classifies transient.
… 200 Review notes: the first status-code mention decides classification, so a 4xx whose body quotes a 5xx stays actionable, and awsRespErrRe shrinks to the 200-with-embedded-error case now that retryable 5xx match shape-independently.
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.
Summary of Changes
dberror.Classifynow treats generic HTTP 5xx error strings (status code 500|502|503|504, alsostatuscode:/status_code=variants) as transient connectivity. The first status-code mention decides — wrapping prepends, so that is the failed request's own status, and a 4xx whose body quotes a 5xx stays actionable. The AWS-shaped regex shrinks to its 200-with-embedded-error case, the only shape the generic pattern can't cover.RefreshValidatorsApp503s classified as Unknown, so the solingest Temporal logger could not demote per-attempt "Activity error." lines and every retry paged (3 ERR lines per 5-min cycle). An S3 503 was already silenced by the AWS-scoped regex; a validators.app 503 paged — this closes that asymmetry for any non-AWS HTTP client.validatorsapp refresh failed, threshold 3 ≈ 15 min sustained) remains the real pager, and 501/505/4xx still classify as actionable.Diff Breakdown
A one-regex classifier change; the rest is test coverage pinning it.
Key files (click to expand)
utils/pkg/dberror/dberror.go— addshttpStatus5xxReand its check inClassifyTesting Verification
dberrorcases: the exact prod validators.app 503 string, generic 500,status_code=502variant classify transient; 400, 501, and a 4xx with an embedded 5xx in the body stay actionable; the existing AWS-scoped andstatuscode: 200negatives still pass.solingestlogger case: a third-party 503 "Activity error." line now demotes to WARN (this is the test that would have caught the page).IsTransient: the S3dberror.Retrysites already matched via the AWS shape, Neo4j/ClickHouse retry sites never produce "status code NNN" strings, and the agent's Anthropic sites only gate Sentry reporting — so the behavior change is confined to log levels plus correctly retrying/not-Sentry-reporting 5xx shapes.-racesuite passed on the branch (thedev/controlcenterembed setup failure is pre-existing on fresh checkouts — CI builds that UI first).