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