-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
access log: add DYNAMIC_METADATA_UNQUOTED formatter #12991
Conversation
This is useful when you are using the header-to-metadata filter to clean up headers and then you want to send that to the access log as plain, non quoted, text. Signed-off-by: Raul Gutierrez Segales <[email protected]>
Per @fishcakez , |
Signed-off-by: Raul Gutierrez Segales <[email protected]>
FWIW, I prefer |
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 have to say I'm leery of this change. Feels like we're in this perpetual state of adding more and more little tweeks for this format or that.
I know. I am also not super excited about having to add this, but I am not sure what other options we have. There's no way to add internal formatters and the cleanest way for us to scrub/clean headers that needed to be logged is:
but the latter isn't happy with old school logging (e.g.: plain).... |
Signed-off-by: Raul Gutierrez Segales <[email protected]>
I think it should be possible to allow extensions to provide their own formatters. But maybe that's one extension type too many. |
@zuercher so shall we let this one land or do we want to explore the extensions path? |
FWIW we already have an extension point for access log filters. Having one for formatters seems like it might be worth it also. |
The only problem I have with landing it that it's forever. I think I'd prefer some change to the parsing of |
Alas, I don't think it would be pretty because:
which means we can't -- cleanly -- add more parameters within the parentheses. After the final
to get what we want.... which is a bit yucky. Hmm. Thoughts? [0] https://github.com/envoyproxy/envoy/blob/master/include/envoy/network/filter.h#L276 |
Sounds like this would be the way forward then, given my above comment about extending |
I think moving to extensions would be the best thing. For the suffix to control output, you could have a further :-separated list of things. So |
Closing this in favor of #13411. |
These are useful for extensions and I need parseCommand() for the extension that will replace: envoyproxy#12991 internally. Signed-off-by: Raul Gutierrez Segales <[email protected]>
This is useful when you are using the header-to-metadata filter to clean
up headers and then you want to send that to the access log as plain, non
quoted, text.
Signed-off-by: Raul Gutierrez Segales [email protected]