Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[prometheus check] Actually use provided "metrics_mapper" (#3446)
The current implementation of the Prometheus check ignores completely the values of `metrics_mapper`, because the code is pretty much building it using the original metric names. Instead, we should use the mappings provided by the user in the `metrics_mapper` dictionary. So given an example config like this: ```yml metrics: - cp_kafka_server_replicamanager_underreplicatedpartitions type_overrides: cp_kafka_server_replicamanager_underreplicatedpartitions: gauge metrics_mapper: cp_kafka_server_replicamanager_underreplicatedpartitions: server.replica_manager.under_replicated_partitions ``` We should emit metrics named `server.replica_manager.under_replicated_partitions` instead of `cp_kafka_server_replicamanager_underreplicatedpartitions` which is what the agent does currently.
- Loading branch information