Support metric labels Grafana syntax for metrics with multiple series

Problem to solve

Prometheus queries for custom metrics might return multiple series. Grafana (as an example) support providing specific labels for such series using values returned by the query.

GitLab only support static string values as labels and it seriously limits the functionality for custom metrics.

Intended users

Developers and Ops users that need to monitor complex scenarios that involve observe the same metric grouped by some attribute of the Prometheus query.

Further details

Example query:

sum(rate(app_projector_time_seconds_count{env=~"$env-$tenant"}[5m])) by (projection_name)

in Grafana I can configure the label to be {{projection_name}} and get a list of nice labels with avg/current for each of the series.

In GitLab, I am unable to build a similar graph.

Proposal

Support Grafana syntax for labels (legend).

Assignee Loading
Time tracking Loading