Skip to content

Log context does not respect order by in Query Builder #1293

Open
@apooridiot

Description

@apooridiot

What happened?

  1. I added an offset Column to handle sorting when the timestamps are the same. (ORDER BY timestamp DESC, offset ASC)
    Image
  2. It works in the dashboard. (Order - Oldest First)
    Image
  3. When I click Show context of one of the logs, it is not sorted by (ORDER BY timestamp DESC, offset ASC) . The clicked log often appears at the bottom. I also found that the logs would be repeated.
    Image
    Image

What did you expect to happen?

I hope that the Log context can be sorted according to the order by of the Query Builder.

How do we reproduce it?

  1. Add a Logs visualization
  2. Add some logs with the same timestamp and sort by other fields.
  3. Click Show context of one of the logs.
  • Grafana version: Grafana v12.0.2 (5bda17e7c1)
  • Plugin version: 4.10.1
  • OS Grafana is installed on: Docker, RockyLinux 9.6
  • User OS & Browser: Windows 10 IoT Enterprise LTSC - Microsoft Edge 137.0.3296.93

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Incoming

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions