Skip to content

Ensure consistency in logging timestamp formats across all services #11916

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

Closed
mrzarquon opened this issue Aug 5, 2022 · 3 comments
Closed

Ensure consistency in logging timestamp formats across all services #11916

mrzarquon opened this issue Aug 5, 2022 · 3 comments
Labels
aspect: error-handling Issues which improve error handling when something fails in Gitpod meta: stale This issue/PR is stale and will be closed soon

Comments

@mrzarquon
Copy link
Contributor

Is your feature request related to a problem? Please describe

Diagnosing cross service errors and events is difficult because different services are logging in different timestamp formats. For example, ide-proxy is outputing log settings in epoch time, with server logging in iso 8601 with millesecond precision and Z timezone marker, while most go based services are logging at iso 8601 with second precision and +offset marker.

Anyone having to write a filter to parse all our various logs and create a trace of events across them will need to know each format. Since these are configurable options in the logging libraries used in the services, there should be a consistent option enforced.

Describe the behaviour you'd like

Everyone logs as iso-8601 with MS or NS level precision in UTC

date --iso-8601=ns -u (or date -Ins -u in busybox) generates a timestamp such like 2022-08-05T09:55:13,076934474+0000 and is an option (ms vs ns could be debated) that other logging libraries can match, and can even be defined as a basic log function in our container run commands:

/ # log() { echo "$(date -Ins -u): $*"; }
/ # log hello world
2022-08-05T10:17:39,000000000+00:00: hello world
@mrzarquon mrzarquon added the aspect: error-handling Issues which improve error handling when something fails in Gitpod label Aug 5, 2022
@stale
Copy link

stale bot commented Nov 9, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the meta: stale This issue/PR is stale and will be closed soon label Nov 9, 2022
@gtsiolis
Copy link
Contributor

gtsiolis commented Nov 9, 2022

Cross-posting #13217 (comment) and follow-up issue #13764 about date format in the dashboard, as this could be helpful for debugging purposes. Cc @mrzarquon

@stale stale bot removed the meta: stale This issue/PR is stale and will be closed soon label Nov 9, 2022
@stale
Copy link

stale bot commented Feb 19, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the meta: stale This issue/PR is stale and will be closed soon label Feb 19, 2023
@stale stale bot closed this as completed Mar 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aspect: error-handling Issues which improve error handling when something fails in Gitpod meta: stale This issue/PR is stale and will be closed soon
Projects
None yet
Development

No branches or pull requests

2 participants