health_check: include HTTP status code in health check events#44390
Open
k1chik wants to merge 3 commits intoenvoyproxy:mainfrom
Open
health_check: include HTTP status code in health check events#44390k1chik wants to merge 3 commits intoenvoyproxy:mainfrom
k1chik wants to merge 3 commits intoenvoyproxy:mainfrom
Conversation
Add http_status_code field to HealthCheckEjectUnhealthy and HealthCheckFailure proto messages. When the HTTP health checker receives a non-2xx response, the status code is threaded through handleFailure() and setUnhealthy() into the event logger and populated on the proto. Non-HTTP health checkers (TCP, gRPC, Redis, Thrift) pass the default value of 0, which the logger skips. Fixes envoyproxy#40221 Signed-off-by: k1chik <107162115+k1chik@users.noreply.github.com>
…eck-status-code Signed-off-by: k1chik <107162115+k1chik@users.noreply.github.com> # Conflicts: # changelogs/current.yaml # source/extensions/health_checkers/http/health_checker_impl.cc
…eck-status-code Signed-off-by: k1chik <107162115+k1chik@users.noreply.github.com>
|
Hi @k1chik, welcome and thank you for your contribution. We will try to review your Pull Request as quickly as possible. In the meantime, please take a look at the contribution guidelines if you have not done so already. |
|
CC @envoyproxy/api-shepherds: Your approval is needed for changes made to |
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.
Commit Message:
health_check: include HTTP status code in health check events
Additional Description:
Add
http_status_codefield toHealthCheckEjectUnhealthyandHealthCheckFailureproto messages. When the HTTP health checker receives a non-2xx response, the status code is threaded throughhandleFailure()andsetUnhealthy()into the event logger and populated on the proto. Non-HTTP health checkers (TCP, gRPC, Redis,Thrift) pass 0, which the logger skips — the field is omitted from the event for non-HTTP failures.
This fix was developed with assistance from Claude Code. I fully understand all submitted code and take ownership of this PR.
Risk Level: Low
Testing:
bazel test //test/common/upstream:health_checker_impl_test --config=clang -c fastbuildbazel test //test/extensions/health_checkers/redis:redis_test --config=clang -c fastbuildbazel test //test/extensions/health_checkers/thrift:thrift_test --config=clang -c fastbuildDocs Changes: N/A
Release Notes: Added under new_features in changelogs/current.yaml.
Platform Specific Features: N/A
Fixes #40221