-
Notifications
You must be signed in to change notification settings - Fork 536
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
feat(accesslog): support config omit_empty_values #2403
Conversation
😊 Welcome @j2gg0s! This is either your first contribution to the Istio api repo, or it's been You can learn more about the Istio working groups, code of conduct, and contributing guidelines Thanks for contributing! Courtesy of your friendly welcome wagon. |
Hi @j2gg0s. Thanks for your PR. I'm waiting for a istio member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
3f254ab
to
bc1151d
Compare
/ok-to-test |
71e0d4d
to
988c0a5
Compare
/test release-notes_api |
988c0a5
to
bfcd47a
Compare
9d7900a
to
086b9af
Compare
995b3f2
to
9f12db9
Compare
Any other thing than i need to fix? |
Yes, can we add a release note for this pls? |
// for labels, the keys with null values are omitted in the output structure. | ||
// | ||
// Example: `omit_empty_values: true` | ||
bool omit_empty_values = 3; |
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.
Could we explain why this is useful and give 1 or two examples? I had to lookup the original issue and envoy docs.
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.
omit_empty_values
is atrribute of envoy's log format, istio should allow this feature to be use by anyone who need.- As an example, we need log CONNECTION_TERMINATION_DETAILS only when connection be terminated,storing this field with null is waste.
- log with null is ugly
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.
@j2gg0s maybe the action here is to link to the envoy docs directly as a "for more information" style helper?
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.
@douglas-reid Did i understand correctly? With latest note
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.
That seems reasonable to me. @linsun wdyt ?
9f12db9
to
3778328
Compare
@j2gg0s: The following test failed, say
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
kindly ping @linsun |
@j2gg0s: PR needs rebase. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Anyone taking this forward? |
@akashjain971 I switched to EnvoyFilters to manage logs, such as: apiVersion: networking.istio.io/v1alpha3
kind: EnvoyFilter
metadata:
name: log
namespace: istio-system
spec:
configPatches:
- applyTo: NETWORK_FILTER
match:
listener:
filterChain:
filter:
name: envoy.filters.network.http_connection_manager
patch:
operation: MERGE
value:
typed_config:
'@type': type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
accessLog:
- name: envoy.access_loggers.file
typedConfig:
'@type': type.googleapis.com/envoy.extensions.access_loggers.file.v3.FileAccessLog
logFormat:
jsonFormat:
authority: '%REQ(:AUTHORITY)%'
...
upstream_transport_failure_reason: '%UPSTREAM_TRANSPORT_FAILURE_REASON%'
omit_empty_values: true
path: /dev/stdout
|
Thank you @j2gg0s. This should sail my boat for now but will this not add latency for every request? |
Looks like OmitEmptyValues is already supported here. |
🚧 This issue or pull request has been closed due to not having had activity from an Istio team member since 2022-07-23. If you feel this issue or pull request deserves attention, please reopen the issue. Please see this wiki page for more information. Thank you for your contributions. Created by the issue and PR lifecycle manager. |
Support user config omit_empty_values for Envoy's AccessLog, reference Issue/31060.
Related envoy's SubstitutionFormatString.omit_empty_values