Add rabbitmq_endpoint label to rabbitmq_identity_info (backport #13218) #13237
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This allows to differentiate between metrics with the same name, coming from the
/metrics/
endpoint and those coming from/metrics/per-object
(or from/metrics
withprometheus.return_per_object_metrics = true
).The lack of such differentiation can easily lead (and leads in our Grafana dashboard) to some values being doubled if both endpoints are scraped (which is a reasonable thing to do - collect aggregated metrics often for a high-level overview and per-object metrics less often not to overload the system). This leads to metric series like these:
a PromQL query such as
sum(rabbitmq_queue_messages_ready)
returns 106, even though there are only 53 messages ready. With this change, you can write a query such asrabbitmq_queue_messages_ready * on (instance, job) rabbitmq_identity_info{rabbitmq_endpoint="aggregated"}
so that per-object values are ignoredThis is an automatic backport of pull request #13218 done by Mergify.