quickwit-oss / quickwit-datasource

Quickwit data source for Grafana
GNU Affero General Public License v3.0
39 stars 9 forks source link

Add sort direction #89

Closed silentsokolov closed 4 months ago

silentsokolov commented 5 months ago

Sometimes, there's a need to change the sorting direction (timestamp only). Unfortunately, the defalut options available in the Grafana interface may not allow for changing the sorting direction. Could we consider adding a special option for that?

image
ddelemeny commented 5 months ago

AFAICT, grafana handles sorting on the timestamp. In Explore : image

And in dashboard panels: image

Does it suit your need ?

silentsokolov commented 5 months ago

Yes, the "Display results" option sorts the data, but only those that have been retrieved (let's say, for example, 100 rows). It would be preferable to sort at the query stage. I'm referring only to the Explore page.

ddelemeny commented 5 months ago

I see. Can you please give more details about your use case ?

Issue #88 is meant to explore the quirks and shortcomings of log exploration regarding pagination, sorting and query limits. I just opened it so it's not very fleshed out at the moment but do you think your use-case would fit under that umbrella ?

silentsokolov commented 4 months ago

Sometimes, when dealing with a complex case involving more than 5000 lines (common cases for us), it's important to understand the root cause rather than the consequences. Either using pagination or increasing the limit ends up being extra work for both humans and quickwit.