grafana / loki

Like Prometheus, but for logs.
https://grafana.com/loki
GNU Affero General Public License v3.0
23.34k stars 3.38k forks source link

Wrong Sorting of logs after applying JSON parser with /loki/api/v1/query #9835

Open jjiiee11 opened 1 year ago

jjiiee11 commented 1 year ago

Granfa 9.4.7 and Loki 2.7.3

The log written to loki is in JSON format. When using /loki/api/v1/query query, it is found that using json parser will cause the time of the query results to be out of order, even if the direction option is added, However everything is fine without json parser. Do you guys have any good suggestions? Here is no-json: no-josn Here is using json: json

jjiiee11 commented 1 year ago

Does anyone have good suggestions? Is this a bug for loki? Or am I using the wrong log ql?