Skip to content

Structured Logging #6465

@shaun-nx

Description

@shaun-nx

Overview

As a user of NGINX Ingress Controller, I would like to have an easier time searching for specific log events so that we can better understand the health of our system and do so in a more performant way

High-level Requirements

  • Update logging library from golang/glog to log/slog
  • Add flag to toggle between string and json log parser
  • Provide a means to use glog as the logging handler for backwards compatibility
  • Update 3.7.0 release documentation to announce update to log/slog

Definition of Done

Development

  • Unit tests are written to cover functionality delivered in the story.
  • Make sure that the unit test passes before creating a pull request.
  • Make sure that the test coverage stays optimal.
  • Run make lint locally before creating a PR.
  • Remove CLI args used for configuring glog levels (eg: deployment.yaml)

Testing

  • NIC starts and runs
  • NIC starts and runs (with the service insight and healthcheck options enabled)
  • Automated tests are written as part of the story.
  • Run “make lint-python“ from root
  • Acceptance criteria are met.
  • Stories are demonstrated to the team.
  • Product Manager accepts the story as done.
  • If a feature requires changes/extensions of the Helm chart, those shall be done as part of the story.

Release Notes & Documentation

  • PR is labeled appropriately so they display in GitHub release notes.
  • Create/update documentation related to the user story.
  • Create/update the example in our codebase when applicable.
### POC Tasks
- [x] POC - Toggle between string and json parser
- [x] POC - Toggle between glog parser and slog structure (string or json)
### Implementation Tasks
- [ ] https://github.com/nginxinc/kubernetes-ingress/issues/6516
- [ ] https://github.com/nginxinc/kubernetes-ingress/pull/6568
- [ ] https://github.com/nginxinc/kubernetes-ingress/issues/6566
- [ ] https://github.com/nginxinc/kubernetes-ingress/pull/6520
- [ ] https://github.com/nginxinc/kubernetes-ingress/pull/6530
- [ ] https://github.com/nginxinc/kubernetes-ingress/pull/6531
- [ ] https://github.com/nginxinc/kubernetes-ingress/pull/6551
- [ ] https://github.com/nginxinc/kubernetes-ingress/pull/6563
- [ ] https://github.com/nginxinc/kubernetes-ingress/pull/6573
- [ ] https://github.com/nginxinc/kubernetes-ingress/pull/6574
- [ ] https://github.com/nginxinc/kubernetes-ingress/pull/6575
- [ ] https://github.com/nginxinc/kubernetes-ingress/pull/6576
- [ ] https://github.com/nginxinc/kubernetes-ingress/pull/6584
- [ ] https://github.com/nginxinc/kubernetes-ingress/pull/6585
- [ ] https://github.com/nginxinc/kubernetes-ingress/pull/6586
- [ ] https://github.com/nginxinc/kubernetes-ingress/pull/6587
- [ ] https://github.com/nginxinc/kubernetes-ingress/pull/6598
- [ ] https://github.com/nginxinc/kubernetes-ingress/pull/6620
- [ ] https://github.com/nginxinc/kubernetes-ingress/pull/6628
- [ ] https://github.com/nginxinc/kubernetes-ingress/pull/6639

Metadata

Metadata

Assignees

No one assigned

    Labels

    changePull requests that introduce a changegoPull requests that update Go codeproposalAn issue that proposes a feature requestrefinedIssues that are ready to be prioritized

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions