Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prometheus: New instant query results view in Explore #60479

Conversation

gtk-grafana
Copy link
Contributor

@gtk-grafana gtk-grafana commented Dec 16, 2022

What this PR does / why we need it:
Addresses concerns with UI in explorer with instant prometheus results.
#32475

This PR adds a new option to the datasources to present a "Raw" prometheus view, which presents prometheus specific UI in addition to the table view and lets users toggle between them. This new view is the default for prometheus instant query results.

TLDR:
Users want to be able to copy and paste prometheus results, and the table view is almost unusable for large queries, which is pushing people to the vanilla prometheus UI.

Which issue(s) this PR fixes:
#32475
But note this PR does not add any functionality for searching through results using browser search, the component introduced in this PR is virtualized, and thus will not be searchable via native browser search. We will create another issue to deal with making query results searchable, and only deal with the other usability concerns surfaced in that issue.

Fixes #32475

Special notes for your reviewer:

  1. The functionality of this PR aims to emulate the behavior of the native prometheus UI in regard to query results, I would suggest any result in grafana that is different (in order, or content) from the native prometheus UI query results is a bug and should be addressed before release.
  2. Where this diverges from prometheus is the ability to compare values across series, or between various computations on the same metric in separate queries. While this new UI isn't intended to provide the ability to compare results from more than 10 queries simultaneously, it typically works well for multiple queries in most of my testing.
  3. This should be considered in alpha or beta, I'd love to get more feedback on this and continue iterating, but at this point (as long as I found all the bugs) I'd like to say this is ready to launch if it's helpful in more use-cases then the table view. For example, the new UI works better with high cardinality databases and large queries (especially for results with many labels that result in tables with many columns).

obetomuniz and others added 30 commits September 20, 2022 17:54
…UI, matching native prometheus UX to return the permutations of the first attribute
Copy link
Member

@Elfo404 Elfo404 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good. it'd be nice to use more theme tokens instead of hardcoded values if possible. i've left a few more (easy) comments for things i missed when i first reviewed it, if we can fix them then i think we are good to go 🚀

Copy link
Member

@Elfo404 Elfo404 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 🚀

@gtk-grafana gtk-grafana modified the milestones: 9.3.3, 9.4.0 Jan 4, 2023
@gtk-grafana gtk-grafana merged commit 0e26524 into main Jan 4, 2023
@gtk-grafana gtk-grafana deleted the gtk-grafana/instant-results-UX-improvements__temp-value-navigation branch January 4, 2023 16:46
@dsotirakis dsotirakis modified the milestones: 9.4.0, 9.4.0-beta1 Jan 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Prometheus: Show results of instant queries as text, not in table
9 participants