Description
Is your feature request related to a problem? Please describe.
We put a lot of queues into each RabbitMQ cluster, many of which are related in various ways. Some of this information can be parsed out of the queue names we generate but this is rather limited. It would be great if we could add per-object custom labels to queue metrics (and e.g. exchange metrics) that we could then use in our observability and monitoring.
Describe the solution you'd like
Custom labels could be set via arguments when a queue/exchange is declared, e.g.
{
"parameters": {
"x-prometheus-labels": {
"custom-label-1": "custom-value-1",
"custom-label-2": "custom-value-2"
}
}
}
Those labels would then be added to the per-queue/exchange metrics generated by the prometheus plugin.
Describe alternatives you've considered
There's some information we can include in e.g. queue names and then parse out later. That's fairly limited though.
Additional context
Could it also be useful to add per-vhost labels that are added to the metrics for all queues and exchanges within that vhost?