Hopefully someone who knows more about this, can recommend another way to get Jenkins metrics.
But you can check some things yourself. Just to be sure, is this the one you are using?
The docs weren’t great for this plugin. If you go to the default endpoint
/prometheus, you should get a list of metrics that are being scraped and you should be able to see the labels being used and if any contain the build name.
Here is an example of a line from the /metrics endpoint for Grafana (with labels: handler, method and statuscode):
The other available plugin seems to be this one:
based on this blog post from Brian Brazil: