Changing Legend field names to label type

Hi there,

I’m new to using Grafana and need a bit of help with changing my visualizations legends to a specific name.

I’m using Prometheus to scrape data and Grafana to visualize it all. The legend shows the following text as it’s legend

{instance="host", job="engine", product="server", type="delivered"}

I have loads of different types and the legend becomes unreadable as I have several different types depending on the visualization. Is there a way I can just display “delivered”, “sent”, “lost” etc. as the label, instead of the whole Prometheus query?

I know I can use overrides and choose ‘Field with Name’ and set them that way, but some visualizations have over 30 types of metrics being reported, so adding all of them will be tedious, considering if any other types get added in the future. As well as the products and instance changing too depending on the environment it’s run on.