grafana/pyroscope

When fetching label names, the API should return their cardinality

オープン

#3,226 opened on 2024/04/17

 (2 件のコメント) (2 件のリアクション) (1 人の担当者)C (528 件のフォーク)batch import
enhancementgood first issue

Repository metrics

Stars
 (9,041 個のスター)
PR merge metrics
 (PR metrics pending)

説明

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

-

コントリビューターガイド