-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
config: added gRPC-based filter to access_log #5682
Conversation
Signed-off-by: Cerek Hillen <cerekh@gmail.com>
Signed-off-by: Cerek Hillen <cerekh@gmail.com>
Signed-off-by: Cerek Hillen <cerekh@gmail.com>
Signed-off-by: Cerek Hillen <cerekh@gmail.com>
Signed-off-by: Cerek Hillen <cerekh@gmail.com>
Signed-off-by: Cerek Hillen <cerekh@gmail.com>
Signed-off-by: Cerek Hillen <cerekh@gmail.com>
… to work on response trailers Signed-off-by: Cerek Hillen <cerekh@gmail.com>
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 for contributing!
Signed-off-by: Cerek Hillen <cerekh@gmail.com>
Signed-off-by: Cerek Hillen <cerekh@gmail.com>
Signed-off-by: Cerek Hillen <cerekh@gmail.com>
… the HTTP status Signed-off-by: Cerek Hillen <cerekh@gmail.com>
@venilnoronha I added a test to check on valid HTTP to gRPC status code mappings for those specified in the gRPC specification. There is also an entry to check that HTTP status code 200 is not errantly mapped to gRPC status code ok. Should I also add tests for all of the other HTTP status codes? |
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 for working on this! A few changes, a test addition, and an idea.
I mentioned this in a comment on the original issue, but is there a canonical way to target an individual build (e.g. |
… to pair, both to prevent g++ compiler errors. Signed-off-by: Cerek Hillen <cerekh@gmail.com>
Thanks @venilnoronha! That's how I've been running my tests, but I don't see anything on specifically instructing Bazel to use a certain compiler. I checked in For now I'm just checking specific features (e.g. constructing |
Signed-off-by: Cerek Hillen <cerekh@gmail.com>
…the filter will infer UNKNOWN Signed-off-by: Cerek Hillen <cerekh@gmail.com>
Signed-off-by: Cerek Hillen <cerekh@gmail.com>
Signed-off-by: Cerek Hillen <cerekh@gmail.com>
Signed-off-by: Cerek Hillen <cerekh@gmail.com>
Signed-off-by: Cerek Hillen <cerekh@gmail.com>
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.
Looks much better. I was wondering if you could add a test for exclude: false
?
Signed-off-by: Cerek Hillen <cerekh@gmail.com>
Forgot that the updated CI scripts needed to be merged 😄 |
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 modulo one nit
Signed-off-by: Cerek Hillen <cerekh@gmail.com>
@junr03 I think this PR is ready for a final check. |
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.
Very nice. 2 small requests than LGTM. Thank you!
/wait
Signed-off-by: Cerek Hillen <cerekh@gmail.com>
Signed-off-by: Cerek Hillen <cerekh@gmail.com>
@crockeo looks like the mac failure is valid, and there is now a conflict with the release doc. |
I'll fix the conflict and also look into the mac failure. |
Signed-off-by: Cerek Hillen <cerekh@gmail.com>
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 pending fixes.
Signed-off-by: Cerek Hillen <cerekh@gmail.com>
Grpc::Utility::httpToGrpcStatus(info.responseCode().value())) | ||
: absl::nullopt, | ||
}; | ||
const std::array<absl::optional<Grpc::Status::GrpcStatus>, 3> optional_statuses = {{ |
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.
I couldn't repro compile errors locally, but it looked like it was expecting braces around each individual object in the array. To do so I needed to add the double brace around the entire initializer list.
Let me know if there's a better way to do it.
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.
Nice!
Signed-off-by: Cerek Hillen <cerekh@gmail.com> Signed-off-by: Fred Douglas <fredlas@google.com>
Description: Creates an access log filter named
GrpcStatusFilter
that allows a set of configured gRPC statuses to be passed though from logging.Risk Level: Medium, adds a new filter.
Testing: Added unit tests to
//test/common/access_log:access_log_impl_test
.Docs Changes: Autogenerated docs changes from comments in
//api/envoy/config/filter/accesslog/v2/accesslog.proto
Release Notes:
Fixes #5567