-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
hc: add health event sink interface and file sink implementation #27419
Conversation
Signed-off-by: Boteng Yao <[email protected]>
CC @envoyproxy/api-shepherds: Your approval is needed for changes made to |
Signed-off-by: Boteng Yao <[email protected]>
Signed-off-by: Boteng Yao <[email protected]>
Signed-off-by: Boteng Yao <[email protected]>
Signed-off-by: Boteng Yao <[email protected]>
/assign @yanavlasov |
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.
/wait
const auto& validator_config = | ||
Envoy::MessageUtil::anyConvertAndValidate<envoy::config::accesslog::v3::AccessLog>( | ||
config.typed_config(), context.messageValidationVisitor()); | ||
access_logs_.emplace_back(AccessLog::AccessLogFactory::fromProto(validator_config, context)); |
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.
After looking at it more, I do not think we should reuse the request access log here, since we loose ability to log the HealthCheckEvent proto without having to convert it to JSON first.
I think it would be cleaner to create a new interface HealthCheckEventSink
with a single log
method that accepts the HealthCheckEvent protobuf as a parameter.
A custom implementation of this sink can do anything it wants with the protobuf (including logging into the request access log if need be).
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.
Agreed. Right now we don't need to convert to json to log it, but just put the proto to stream_info. Right, I think a new interface is cleaner.
Signed-off-by: Boteng Yao <[email protected]>
Signed-off-by: Boteng Yao <[email protected]>
Signed-off-by: Boteng Yao <[email protected]>
Signed-off-by: Boteng Yao <[email protected]>
Signed-off-by: Boteng Yao <[email protected]>
Signed-off-by: Boteng Yao <[email protected]>
Signed-off-by: Boteng Yao <[email protected]>
Signed-off-by: Boteng Yao <[email protected]>
Signed-off-by: Boteng Yao <[email protected]>
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.
/wait
Signed-off-by: Boteng Yao <[email protected]>
Signed-off-by: Boteng Yao <[email protected]>
Signed-off-by: Boteng Yao <[email protected]>
Signed-off-by: Boteng Yao <[email protected]>
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.
LGTM with small nit to add TODO.
/wait
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.
Thanks!
Left a few small nits but overall LGTM.
Signed-off-by: Boteng Yao <[email protected]>
Signed-off-by: Boteng Yao <[email protected]>
Signed-off-by: Boteng Yao <[email protected]>
Signed-off-by: Boteng Yao <[email protected]>
/retest |
…oyproxy#27419) * add access log to health check Signed-off-by: Boteng Yao <[email protected]> Signed-off-by: Ryan Eskin <[email protected]>
Added health event sink extension, and provided the file sink implementation to deprecate the event_log_path field.
Commit Message:
Additional Description:
Risk Level: Low
Testing: unit test
Docs Changes:
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional API Considerations:]