Skip to content
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

Enhance Contour's Envoy Logging Configuration for Field Omission of Null/Empty Values #6067

Closed
m-yosefpor opened this issue Jan 10, 2024 · 2 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/needs-triage Indicates that an issue needs to be triaged by a project contributor. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.

Comments

@m-yosefpor
Copy link
Contributor

m-yosefpor commented Jan 10, 2024

Issue Description:

Currently, when utilizing Contour's Envoy logging configuration, there is no built-in mechanism to handle or omit fields with null or empty values in the generated logs. This behavior can lead to verbose logs containing unnecessary or irrelevant information, potentially complicating log analysis and management processes.

To optimize the logging output and improve the clarity and relevance of Envoy logs generated by Contour, it is essential to introduce a dedicated configuration field within ContourConfiguration that controls the handling of null or empty values. By incorporating the omitEmptyValues option in the Envoy log configuration, users can selectively exclude fields that do not contain meaningful data, ensuring a more concise and efficient logging experience.

Proposed Implementation:

  1. Configuration Enhancement: Introduce a new field, omitEmptyValues, within the logging section of the ContourConfiguration resource. This field will allow users to specify whether Envoy logs should omit fields with null or empty values.
apiVersion: projectcontour.io/v1alpha1
kind: ContourConfiguration
metadata:
  name: example
spec:
  envoy:
    logging:
      accessLogFormat: json
      omitEmptyValues: true ## default to false to ensure backward compatibility
      accessLogJSONFields:
      - "@timestamp"
      - "authority"
      - "bytes_received"
       ....
      - "header_foo=%RESP(foo)%"
      - "header_bar=%RESP(bar)%"

By introducing the omitEmptyValues option in Contour's Envoy logging configuration, users can have more control over the logging output, promoting cleaner and more actionable logs that facilitate efficient monitoring and troubleshooting activities.

@m-yosefpor m-yosefpor added kind/feature Categorizes issue or PR as related to a new feature. lifecycle/needs-triage Indicates that an issue needs to be triaged by a project contributor. labels Jan 10, 2024
abbas-gheydi added a commit to abbas-gheydi/contour that referenced this issue Jan 13, 2024
abbas-gheydi added a commit to abbas-gheydi/contour that referenced this issue Jan 13, 2024
Copy link

The Contour project currently lacks enough contributors to adequately respond to all Issues.

This bot triages Issues according to the following rules:

  • After 60d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, the Issue is closed

You can:

  • Mark this Issue as fresh by commenting
  • Close this Issue
  • Offer to help out with triage

Please send feedback to the #contour channel in the Kubernetes Slack

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Mar 11, 2024
@tsaarni
Copy link
Member

tsaarni commented Apr 10, 2024

closed by #6077

@tsaarni tsaarni closed this as completed Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/needs-triage Indicates that an issue needs to be triaged by a project contributor. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.
Projects
None yet
Development

No branches or pull requests

2 participants