-
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
Log lines with same timestamp are not in order after ingesting to Loki #13295
Comments
Either logcli or Loki API could retrieve the log lines in correct order, but just Grafana, now I am suspecting whether this is a Grafana issue. |
It seems this is owning to Grafana log visualization:
Thanks @tonyswumac |
I am afraid I have to re-open this issue as the function of |
@duj4 I think the |
Thanks for the reply @ravishankar15 , per the illustration of this config:
This should work for the log lines with same timestamp instead of the whole line, otherwise the subsequent ones will be discarded . |
@duj4 I think that will cause breakage when we receive out of order events,
To dedup the out of order events we consider the log line as well for incrementing the timestamp. May be a new setting which does not care of duplicate out of order events can help here but that is a hacky approach AFAIK. |
thanks @ravishankar15 , I tested that function in 3.1.0 but still no luck |
I think the function is working as expected, I can see the timestamp incremented verified from the API, Push Request,
Query Request
Query Result
I also tried with fluent-bit for the above logs. The timestamp is taken as the current timestamp Couple of things you can check,
|
Describe the bug
I am ingesting the log files to Loki via Fluent-bit loki output plugin, the log lines with same timestamp were not in the order as they were in the original logs.
Original log files:
Queried from Grafana:
Output with Fluent-bit stdout plugin:
Per the suggestion in cannot order loki entries with same timestamp · Issue #56071 · grafana/grafana · GitHub, I set
increment_duplicate_timestamp
astrue
, but still no luck.To Reproduce
Steps to reproduce the behavior:
Expected behavior
Log lines with same timestamp should be kept in order as they were in the original log files.
Environment:
Screenshots, Promtail config, or terminal output
Uploaded in above sections.
The text was updated successfully, but these errors were encountered: