Graylog2 / graylog2-server

Free and open log management
https://www.graylog.org
Other
7.33k stars 1.06k forks source link

Unable to sort by percentile in aggregation widget #16405

Open miwent opened 1 year ago

miwent commented 1 year ago

When attempting to sort an aggregation by a percentile metric the sort tile disappears.

percentile_sort

Expected Behavior

Able to sort by percentile

Current Behavior

The sort widget disappears when attempting to preview/update the aggregation widget. No error appears in the server log and there is no obvious (to me) error in the developer tools.

Possible Solution

Steps to Reproduce (for bugs)

  1. Create an aggregation widget grouping by a numeric field (any type of visualization)
  2. Add a metric for "percentile" and select any number
  3. Add a sort for the percentile field, any order
  4. Click either "Update Preview" or "Update Widget"
  5. In either case, the sort by percentile option is removed

Context

Your Environment

luk-kaminski commented 11 months ago

After quick recon, it seems it may be a FE issue, BE receives search with empty sort:

(...) "series":[{"id":"percentile(ticks,95)","type":"percentile","field":"ticks","percentile":"95"}], "rollup":true, "row_groups":[{"type":"values","fields":["action"],"limit":15}], "type":"pivot", "id":"b5d3a37e-c95c-48fb-95f8-559aa9a1fbaa", "filters":[], "column_groups":[], "sort":[] (...)