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

When fetching label names, the API should return their cardinality #3226

Open
grafakus opened this issue Apr 17, 2024 · 2 comments · May be fixed by #3563
Open

When fetching label names, the API should return their cardinality #3226

grafakus opened this issue Apr 17, 2024 · 2 comments · May be fixed by #3563
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@grafakus
Copy link
Collaborator

grafakus commented Apr 17, 2024

Is your feature request related to a problem? Please describe.

When fetching label names from the /querier.v1.QuerierService/LabelNames API endpoint, it would be great if the API could return the labels cardinality:

  1. For our Explore Profiles app in the "Labels" view, this would prevent requesting all the label values for all the labels, which is required to be able to sort the viz panels presented to the user (from highest cardinality to lowest)
  2. For the query builder, it would allow to adapt itself and to prevent long loading times, or even timeouts, when fetching label values.

Describe the solution you'd like

See above.

Describe alternatives you've considered

  • The Explore Profiles app currently hides high cardinality labels based on their names. The query builder has also some special logic to prevent fetching label values in this case.
  • The "Labels" view is fetching all the label values always, just to figure out their number (their specific values are not used)

Additional context

-

@grafakus grafakus added the enhancement New feature or request label Apr 17, 2024
@simonswine simonswine added the good first issue Good for newcomers label Aug 5, 2024
@aleks-p
Copy link
Contributor

aleks-p commented Sep 13, 2024

#3354 does this in the profilecli and can be used for reference.

@korniltsev
Copy link
Collaborator

Can we maybe add a pagination + search?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants