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

🐛 Don't munge timestamp in structured logs, again #1439

Merged

Conversation

zaneb
Copy link
Member

@zaneb zaneb commented Nov 10, 2023

Structured logging tools expect a POSIX timestamp. 0a887a1 reverted to changing the timestamp formatting only in development log mode, after 9ecf171 had explicitly and unconditionally set the format to ISO-8601.

However, almost immediately after this, 5bf0440 bumped the controller-runtime version from 0.13.1 to 0.14.5. In 0.14, the default zap options in controller-runtime changed to RFC3339 - which is the same as ISO-8601 but even worse because subsecond precision (which can be very important to debugging) is lost as well.

This change explicitly restores the original default.

@metal3-io-bot metal3-io-bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Nov 10, 2023
Structured logging tools expect a POSIX timestamp.
0a887a1 reverted to changing the
timestamp formatting only in development log mode, after
9ecf171 had explicitly and
unconditionally set the format to ISO-8601.

However, almost immediately after this,
5bf0440 bumped the controller-runtime
version from 0.13.1 to 0.14.5. In 0.14, the default zap options in
controller-runtime changed to RFC3339 - which is the same as ISO-8601
but even worse because subsecond precision (which can be very important
to debugging) is lost as well.

This change explicitly restores the original default.
@zaneb zaneb force-pushed the logging-structured-timestamp-again branch from bfd4503 to 4b8c581 Compare November 10, 2023 03:19
@zaneb
Copy link
Member Author

zaneb commented Nov 10, 2023

/test-centos-e2e-integration-main
/test-ubuntu-integration-main

Copy link
Member

@kashifest kashifest left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve

@metal3-io-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kashifest

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@metal3-io-bot metal3-io-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 13, 2023
@honza
Copy link
Member

honza commented Nov 13, 2023

/lgtm

@metal3-io-bot metal3-io-bot added the lgtm Indicates that a PR is ready to be merged. label Nov 13, 2023
@metal3-io-bot metal3-io-bot merged commit 9ebf2d0 into metal3-io:main Nov 13, 2023
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants