Skip to content

Make order by optional in searches #1362

Open

Description

@benjreinhart

Coming from other tools, hyperdx feels quite rigid. It would go along way to support custom queries for searches (and maybe charts). The custom queries should also support alerting functionality. We use custom queries and alerts on those in axiom, for example. While I think it's good to strive for having high-level UI primitives for most things, I don't think that'll cover 100% of user needs, so it would be very powerful to allow folks to write custom queries and setup alerts over those queries.

This is maybe not the best example, but I was trying to calculate rate. The screenshot below demonstrates a few issues:

  1. Sort of working, but verry clunky to put in custom SQL
  2. bug: adds my default fields to select even though I removed them
  3. bug: adds order by even though I removed it
  4. Because it adds order by and other fields, query doesn't work
Image

Activity

  1. brandon-pereira commented on Nov 17, 2025

    @brandon-pereira
    Member

    Hey @benjreinhart, This makes sense to me! Is your goal to have a query that shows you the error rate in a given time window?

    I see you have two issues, this one and #1363.

    What do you think about making this ticket about making order by optional, and the other ticket about not adding additional fields to the select?

    I believe this one should be fairly easy to implement, #1363 might be a bit more challenging and require more testing.

  2. benjreinhart commented on Nov 17, 2025

    @benjreinhart
    Author

    Happy to make this about removing the order by. The big picture here (apologies if I was confusing) is to allow arbitrary queries for more flexibility and ensure the alerts can be configured over those arbitrary queries. If you think the combination of #1363 and removing order by captures that, then 👍🏻

  3. changed the title [-]Support custom SQL in searches + alerts[/-] [+]Make `order by` optional in searches[/+] on Nov 17, 2025
  4. MikeShi42 commented on Nov 18, 2025

    @MikeShi42
    Contributor

    @benjreinhart I think this might a bit of difference between tools like Axiom/Splunk where the search panel also does aggregations vs HyperDX where we actually split out the two workflows.

    The search page is optimimized for just showing results (logs, traces) that match a given filter criteria - but not really graph it.

    For things like building a chart visualization, you should be able to accomplish what you're looking for in the chart explorer instead. Though agreed - we want to make it so that users can also just type in arbitrary SQL when they need it.

  5. benjreinhart commented on Nov 18, 2025

    @benjreinhart
    Author

    @MikeShi42 for sure, the point I was tying to make was about flexible search capabilities not necessarily where the visualization / tabular results are shown. I think the most important thing for my team is to ensure we can set up monitors for arbitrarily complex queries

  6. krishs01 commented on Sep 19, 2026

    @krishs01
    Contributor

    Hii @benjreinhart , is this issue still open, I'm a first time contributor and would like to work on this.

  7. pulpdrew commented on Nov 17, 2026

    @pulpdrew
    Contributor

    The big picture here is to allow arbitrary queries for more flexibility and ensure the alerts can be configured over those arbitrary queries.

    Hey there - Raw SQL dashboard tiles / chart explorer queries were added back in March, so arbitrary queries can be searched, visualized, and alerted on chart explorer or dashboard pages.

    IMO if making the order by optional on the search page was intended to enable those use-cases, we should probably close this issue and open up followups if there are issues with the chart explorer or dashboards functionality for your use case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions