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

Promtail: output timestamp with nanosecond precision in dry-run mode #4006

Merged
merged 1 commit into from
Jul 19, 2021

Conversation

dannykopping
Copy link
Contributor

What this PR does / why we need it:
Currently Promtail only logs the entry timestamp with second precision in dry-run mode; this should be nanosecond to match what Loki can support. Without this, users who are correctly parsing their timestamps with nanosecond precision will become confused when the dry-run output only shows second precision.

Which issue(s) this PR fixes:
Fixes #3955

Special notes for your reviewer:

Checklist

  • Documentation added
  • Tests updated

Signed-off-by: Danny Kopping <danny.kopping@grafana.com>
@dannykopping dannykopping requested a review from a team July 18, 2021 13:55
Copy link
Contributor

@sandeepsukhani sandeepsukhani left a comment

Choose a reason for hiding this comment

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

LGTM

@cyriltovena cyriltovena merged commit b72a470 into grafana:main Jul 19, 2021
@dannykopping dannykopping changed the title Promtial: output timestamp with nanosecond precision in dry-run mode Promtail: output timestamp with nanosecond precision in dry-run mode Jul 19, 2021
@samjewell
Copy link
Contributor

Awesome 👏 thanks for this @dannykopping

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

Successfully merging this pull request may close these issues.

promtail dry-run to include fractions of second in timestamp
4 participants