Sorting of logs after applying JSON parser with LogQL

Hallo,

I have a strange behavior and I don’t know if it is a problem with my LogQL query.

We get JSON log from our pods and when I display the stream in the log panel I get the expected result.

To be able to create a condition with fields in our JSON log we use the | json parser on the log stream.

Unfortunately, as soon as we apply the parser, the sorting of our logs is no longer correct.

Here is a simple example of our query:

{namespace="app-system", pod=~".+appA-.+"} | json

Maybe someone has a tip for us how to get the correct sorting after applying the parser.

As additional information we currently use Loki 2.4.2 and Grafana 8.4.2.

Regards,
Manuel

The problem is still present in v 9.3.1

Using /loki/api/v1/query has a similar problem. :smile:
Granfa 9.4.7 and Loki 2.7.3

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.