-
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
router: implement upstream log #1986
router: implement upstream log #1986
Conversation
Signed-off-by: Stephan Zuercher <stephan@turbinelabs.io>
Signed-off-by: Stephan Zuercher <stephan@turbinelabs.io>
Signed-off-by: Stephan Zuercher <stephan@turbinelabs.io>
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.
This is really neat. Ultimately I think we will want to add other things in here. For example retry count, etc. But this is a great start. Code looks great also per usual. Thanks a lot for putting the tests in a new file since the other one is already huge. Just one small nit that I see. Also, we will need to fix up the docs for access logging in general when we turn on the v2 docs. I guess initially we can just ref back to v1 docs for format info. cc @htuch
source/common/router/router.h
Outdated
config.start_child_span()) { | ||
for (const auto& upstream_log : config.upstream_log()) { | ||
Http::AccessLog::InstanceSharedPtr current_upstream_log = | ||
Http::AccessLog::AccessLogFactory::fromProto(upstream_log, 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.
nit: just fold this into the next line
const std::string& stat_prefix, | ||
FactoryContext& context) override; | ||
|
||
ProtobufTypes::MessagePtr createEmptyConfigProto() override { |
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.
Signed-off-by: Stephan Zuercher <stephan@turbinelabs.io>
…voyproxy#1986) This reverts commit b33ceb2.
Signed-off-by: Jose Nino <jnino@lyft.com> Signed-off-by: JP Simard <jp@jpsim.com>
Signed-off-by: Jose Nino <jnino@lyft.com> Signed-off-by: JP Simard <jp@jpsim.com>
Description:
Adds support for the
upstream_log
field of the v2 API'sRouter
HTTP filter. The upstream log reuses the existing access log code for configuring and generating logs. The feature is enabled by adding the appropriate log file configuration to the Router object in the v2 API only.Closes #1927.
API Change: envoyproxy/data-plane-api#211
Risk Level: Medium -- adds code to a heavily used filter.
Testing:
Unit tests to verify that logs are generated when expected and disabled by default.
Additional manual testing with parallel requests.
Release Notes:
Note that api.http.filter.Router upstream_log configuration point is available for use.