-
Notifications
You must be signed in to change notification settings - Fork 5.3k
health_check: include HTTP status code in health check events #44390
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 3 commits
9193055
e72f64e
bf4b76a
65cc5b8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -87,6 +87,12 @@ message HealthCheckEjectUnhealthy { | |||||
|
|
||||||
| // The type of failure that caused this ejection. | ||||||
| HealthCheckFailureType failure_type = 1 [(validate.rules).enum = {defined_only: true}]; | ||||||
|
|
||||||
| // The HTTP status code of the health check response that triggered the ejection. | ||||||
| // Only set when the health checker type is HTTP and the failure type is ACTIVE. | ||||||
| // A value of 0 indicates that no HTTP status code was recorded (e.g., network-level failures | ||||||
| // or non-HTTP health checkers). | ||||||
| uint32 http_status_code = 2; | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should the type be HttpStatus?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The StatusCode enum |
||||||
| } | ||||||
|
|
||||||
| message HealthCheckAddHealthy { | ||||||
|
|
@@ -111,6 +117,12 @@ message HealthCheckFailure { | |||||
|
|
||||||
| // Whether this event is the result of the first ever health check on a host. | ||||||
| bool first_check = 2; | ||||||
|
|
||||||
| // The HTTP status code of the health check response that caused this failure. | ||||||
| // Only set when the health checker type is HTTP and the failure type is ACTIVE. | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| // A value of 0 indicates that no HTTP status code was recorded (e.g., network-level failures | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| // or non-HTTP health checkers). | ||||||
| uint32 http_status_code = 3; | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as above |
||||||
| } | ||||||
|
|
||||||
| message DegradedHealthyHost { | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
High-level question:
are there other http-specific responses that are expected to be populated?
If so, will it make sense to add a type that is shared between
HealthCheckEjectUnhealthyandHealthCheckFailureand is HTTP specific and is populated when an HTTP rejection occurs?Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good point. no other HTTP-specific fields are planned for this PR. but if you'd prefer a shared sub-message now for future extensibility, happy to add one. just let me know which way you want to go.