-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
kinesis_streams plugin truncates time_key when using millsecond precision format #7538
Comments
Ack. https://github.com/fluent/fluent-bit/blob/master/src/aws/flb_aws_util.c#L1003 So the problem in the code I see is that we need to ensure that millisecond_str and nanosecond_str are always the same length... milliseconds should always be 3 chars and nano should be 9 and if it isn't, we need to add leading zeroes. I apologize for this bug, I should've noticed this during PR review. |
I've got a fix: #7538 |
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days. Maintainers can add the |
This issue was closed because it has been stalled for 5 days with no activity. |
Still hoping for this to be fixed. |
Bug Report
Describe the bug
kinesis_streams
output plugin truncates sub-seconds when using millisecond precision withtime_key
andtime_key_format
. This only occurs when the resulting time_key milliseconds are below 100ms. e.g..00X
and.0XX
..00X
becomes.X
on the time_key field.0XX
becomes.XX
on the time_key fieldRaw message with focus on pertinent fields:
Expected behavior
The timestamp entry to retain its precision when using millsecond format and not remove preceding 0's.
Your Environment
Additional context
Our log files end up in Loggly after Kinesis. Loggly has limitations on the timestamp entry to correctly parse logs.
https://documentation.solarwinds.com/en/success_center/loggly/content/admin/automated-parsing.htm#json
This is why we cannot use the default
time
field and also why we cannot use the 9 digit precision of thekinesis_output
plugin with'%9N'
.The effect of this causes any log entries between
.000
and.099
to become out of order since they are indexed almost a full second after when they should be. This can make troubleshooting logs difficult since the entries are out of order from the expected output. An example would be a log entry that occurs atX.009
becomesX.9
which gets interpreted and index asX.900
in our logging aggregator.The text was updated successfully, but these errors were encountered: