Skip to content

implement new request_id_utils extension system#10018

Closed
rossdylan wants to merge 6 commits intoenvoyproxy:masterfrom
rossdylan:request-id-utils
Closed

implement new request_id_utils extension system#10018
rossdylan wants to merge 6 commits intoenvoyproxy:masterfrom
rossdylan:request-id-utils

Conversation

@rossdylan
Copy link
Copy Markdown

Description:
Allows for extensions to customize the behaviour of Request ID manipulation. This replaces the UUIDUtils class and makes it generic. This makes it possible to customize how request IDs are used for tracing and logging. This is my first contribution to envoy and it turned out to be a bit more invasive than I expected so I'd appreciate feedback on how I laid things out. I mostly followed the example of access_loggers but I'm not sure if that is the ideal.

Risk Level: Medium/High. No behaviour is changing, but UUIDUtils was wired into a bunch of different systems and extensions.
Testing: This PR is a work in progress, I still need to add new tests for the new code, but all existing tests pass with the changes.
Docs Changes:
Release Notes:

Implements changes from #7624

@repokitteh-read-only
Copy link
Copy Markdown

CC @envoyproxy/api-shepherds: Your approval is needed for changes made to api/.

🐱

Caused by: #10018 was opened by rossdylan.

see: more, trace.

Comment thread include/envoy/request_id_utils/request_id_utils.h Outdated
Comment thread include/envoy/request_id_utils/request_id_utils.h Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't look like proto is passed to this factory in any way.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: maybe move this and other constants below to anonymous namespace in .cc file?

Comment thread test/common/access_log/access_log_impl_test.cc Outdated
Copy link
Copy Markdown
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At a high level this LGTM. I put some high level comments around configuration and extension loading, so let's nail those first along with the other comments from @euroelessar and then I will take another pass. Note also that this will need release notes and some documentation, at least in https://www.envoyproxy.io/docs/envoy/latest/extending/extending.

Thank you for working on this!

/wait

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should use a typed_config here (with any Any param) to allow for future configuration. This is how are we standardizing on loading extensions now. Please see other examples.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the existing functionality be always linked with possible overriding? This will avoid build changes for all consumers that might rely on this functionality?

@stale
Copy link
Copy Markdown

stale Bot commented Feb 20, 2020

This pull request has been automatically marked as stale because it has not had activity in the last 7 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

@stale stale Bot added the stale stalebot believes this issue/PR has not been touched recently label Feb 20, 2020
@stale stale Bot removed the stale stalebot believes this issue/PR has not been touched recently label Feb 24, 2020
Ross Delinger added 6 commits February 23, 2020 19:37
…in issue #7624.

Signed-off-by: Ross Delinger <rossd@dropbox.com>
Signed-off-by: Ross Delinger <rossd@dropbox.com>
Signed-off-by: Ross Delinger <rossd@dropbox.com>
Signed-off-by: Ross Delinger <rossd@dropbox.com>
Signed-off-by: Ross Delinger <rossd@dropbox.com>
Signed-off-by: Ross Delinger <rossd@dropbox.com>
@mattklein123
Copy link
Copy Markdown
Member

@rossdylan in the future friendly request to not force push. Please just merge master and add commits as it makes reviews easier. Thank you!

Copy link
Copy Markdown
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks flushing out a few API comments. Excited to see this being worked on!

/wait

}

message RequestIDUtils {
reserved 3;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this can be removed?

Comment on lines +645 to +649
string name = 1 [(validate.rules).string = {min_bytes: 1}];

// Request ID utility specific configuration.
oneof config_type {
google.protobuf.Struct config = 2 [deprecated = true];
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove both name and config, and just use typed_config to load the extension.

Comment on lines +488 to +489
// The configuration of the extension to use for request ID utilities. This includes operations such as
// generation, validation, and associated tracing operations.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per my previous comment, I think if nothing is specified here we should just use the default implementation that is provided today? Can you clarify that?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah I can clarify that, the current behaviour is that we use the UUIDUtils extension by default if nothing is provided. It is also linked in by default now.

@stale
Copy link
Copy Markdown

stale Bot commented Mar 11, 2020

This pull request has been automatically marked as stale because it has not had activity in the last 7 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

@stale stale Bot added the stale stalebot believes this issue/PR has not been touched recently label Mar 11, 2020
@euroelessar
Copy link
Copy Markdown
Contributor

I'm taking over this pull request in #10429, please close this one & let's continue discussion in another one (or let me know if there is a better way to commandeer changes at GitHub if there is any)

@stale stale Bot removed the stale stalebot believes this issue/PR has not been touched recently label Mar 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants