Repository navigation
Improve reverse proxy active health check logging - #2
Closed
ryans-posthog wants to merge 2 commits into
Closed
ryans-posthog wants to merge 2 commits into
ryans-posthog wants to merge 2 commits into
Conversation
Add more context to active health check log messages to help operators
diagnose upstream issues:
- Log "host is down" when a host transitions to unhealthy (previously
only "host is up" was logged on recovery, making it hard to correlate)
- Include upstream dial address in health transition logs ("host is up"
and "host is down") for easier identification in multi-upstream setups
- Include expected_status in "unexpected status code" log so operators
can see both actual and expected values at a glance
- Include expected_body_pattern in "response body failed expectations"
log to clarify what regex the body was checked against
Generated-By: PostHog Code
Task-Id: e12d0e86-41aa-489e-a671-495c07b60b5d
Owner
Author
|
Expand the logging a bit mre |
Address feedback to expand logging further:
- Log active health checker configuration at provision time (method,
interval, timeout, thresholds, expected status/body, upstream count)
- Add upstream dial address to all health check failure logs (HTTP
request failed, unexpected status, status out of tolerances, body
read failure, body mismatch) for consistent upstream identification
- Add method and URL to "HTTP request failed" log for full request
visibility
- Add expected_range "2xx" to "status code out of tolerances" log
- Clarify passive health check error messages ("could not count
passive health failure" / "could not forget passive health failure")
and include fail_duration for debugging expiry issues
Generated-By: PostHog Code
Task-Id: e12d0e86-41aa-489e-a671-495c07b60b5d
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
upstreamdial address, making it easier to identify which backend is affected in multi-upstream configurations.status_codeandexpected_status. The "response body failed expectations" log now includes theexpected_body_patternregex.Test plan
go build ./...expect_statusand verify the log includes both actual and expected status codes when they don't matchexpect_bodyand verify the log includes the expected pattern when the body doesn't matchCreated with PostHog Code