Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add prometheus tags for raft_cluster to non-QQ raft metrics
By default Ra will use the cluster name as the metrics key. Currently atom values are ignored by the prometheus plugin's tag rendering functions, so if you have a QQ and Khepri running and request the `/metrics/per-object` or `/metrics/detailed` endpoints you'll see values that don't have labels set for the `ra_metrics` metrics: # TYPE rabbitmq_raft_term_total counter # HELP rabbitmq_raft_term_total Current Raft term number rabbitmq_raft_term_total{vhost="/",queue="qq"} 9 rabbitmq_raft_term_total 10 With this change we map the name of the Ra cluster to a "raft_cluster" tag, so instead an example metric might be: # TYPE rabbitmq_raft_term_total counter # HELP rabbitmq_raft_term_total Current Raft term number rabbitmq_raft_term_total{vhost="/",queue="qq"} 9 rabbitmq_raft_term_total{raft_cluster="rabbitmq_metadata"} 10 This affects metrics for Khepri and the stream coordinator.
- Loading branch information