Open duj4 opened 1 week ago
If I toggle Newest first
in Grafana, the log lines are showing as expected, in the correct reversed order though:
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:
Order - Display results in descending or ascending time order. The default is Descending, showing the newest logs first. Set to Ascending to show the oldest log lines first.
Thanks @tonyswumac
I am afraid I have to re-open this issue as the function of increment_duplicate_timestamp
was not functioning at all.
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:![image](https://github.com/grafana/loki/assets/19278537/4a8c5762-e7ed-4584-bd11-27c7e0300ad9)
Output with Fluent-bit stdout plugin:![image](https://github.com/grafana/loki/assets/19278537/cf414358-3595-478f-a2f6-0969aeb639f1)
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.