I have a Prometheus metric like this:
lines_added{project="xx",user="xx"}
The project label and user label are integer ids, not good for legend on graph.
I have another variable members
as query from a PostgreSQL data source:
select u.id as __value,u.name as __text
from project_authorizations pa left join users u
on pa.user_id = u.id
where pa.project_id=[[project]]
For the lines_added
metric, how can I make it display the user's real name according "id"->"name" mapping in variable members
?
Is that possible with Grafana?