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

[BUG] Fix logger time format for improved debugging and issue analysis and ensure structured logging is used. #524

Closed
unmarshall opened this issue Feb 10, 2023 · 0 comments · Fixed by #632
Assignees
Labels
kind/bug Bug status/closed Issue is closed (either delivered or triaged)
Milestone

Comments

@unmarshall
Copy link
Contributor

unmarshall commented Feb 10, 2023

Describe the bug:
Reference: https://sap-ti.slack.com/archives/C0177NLL8V9/p1676014983819069

Time encoder:
The date-time format used in etcd-druid makes it impossible to know the date and time.
We have always used the default time encoder and recently a PR#450 bumped up the controller-runtime version. We also see the following issue kubernetes-sigs/controller-runtime#2029 which highlights that the default encoder is epoch time and the PR fixes that. Ideally we should not assume that the correct defaults are set and explicitly define the encoder while initialising the logger.

Structured Logging and add context.
Both logr and the underline zap provides for structured logging. Check if this is used consistently and correct anywhere it is not. Logs such as Custodian controller reconciliation started does not provide any benefit. Additional context should be provided.

Expected behavior:
Date and time should be clearly distinguished and visible for all log statements emitted. Structure logging should be used where parameters are passed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Bug status/closed Issue is closed (either delivered or triaged)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants