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

Support subsecond resolution timestamps in logcli's default output mode #9635

Open
jtackaberry opened this issue Jun 5, 2023 · 4 comments · May be fixed by #15189
Open

Support subsecond resolution timestamps in logcli's default output mode #9635

jtackaberry opened this issue Jun 5, 2023 · 4 comments · May be fixed by #15189

Comments

@jtackaberry
Copy link
Contributor

Currently logcli's default output mode has second resolution, which (as of recently) lags behind Grafana's explore view, which now shows milliseconds. I understand we get higher resolution timestamps with jsonl output, but the default output is the most convenient for common use cases.

The simplest solution is to change this line to use time.RFC3339Nano instead of time.RFC3339.

I can submit a PR for this.

The only question I have is whether this should be the default behavior, or whether subsecond resolution should be tucked behind a disabled-by-default flag. This change could break naive parsers of logcli output. IMO it should be default, with the old behavior restorable through a flag (such as --timestamps=seconds), but it could be the other way around, where a flag is required to enable more granular timestamps (such as --timestamps=nanos).

@rbruggem
Copy link

rbruggem commented Jun 7, 2023

+1

1 similar comment
@pbilstein
Copy link

+1

@pigletfly
Copy link

any updates on this?

@duj4
Copy link

duj4 commented Jun 26, 2024

In 3.0, issue still exists:

Via logcli:
image

Via API:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants