-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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: support unix timestamps with fractional seconds #2301
Promtail: support unix timestamps with fractional seconds #2301
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome thank you for this.
Could you add some tests case ? we have a test function in util_test.go named TestConvertDateLayout
Codecov Report
@@ Coverage Diff @@
## master #2301 +/- ##
==========================================
- Coverage 62.27% 62.25% -0.02%
==========================================
Files 158 158
Lines 12766 12776 +10
==========================================
+ Hits 7950 7954 +4
- Misses 4201 4205 +4
- Partials 615 617 +2
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM,
just a small nit and we're good to merge.
Co-authored-by: Cyril Tovena <cyril.tovena@gmail.com>
Again thank you so much @flixr for this contribution, I'll merge it as soon as it builds. |
my pleasure, thanks for the quick review! |
I'm looking at that CI issue, not your fault btw. |
If the timestamp contains a
.
, parse the fractions into nanoseconds.What this PR does / why we need it:
See #2193
Which issue(s) this PR fixes:
Fixes #2193
Special notes for your reviewer:
There might be a nicer way, but I'm a Go newbie...
Checklist