diff --git a/README.md b/README.md index 3b51b7d..f7eb1a3 100644 --- a/README.md +++ b/README.md @@ -134,9 +134,9 @@ Some of the connection pool configurations can be adjusted dynamically. Each con - `mobc_pool_connections_open` - Number of currently open Pool Connections - `mobc_pool_connections_busy` - Number of currently busy Pool Connections (executing a database query)" - `mobc_pool_connections_idle` - Number of currently unused Pool Connections (waiting for the next pool query to run) - - `mobc_client_queries_wait` - Number of queries currently waiting for a connection + - `mobc_queries_wait` - Number of queries currently waiting for a connection - Histograms - - `mobc_client_queries_wait_histogram_ms` - Histogram of the wait time of all queries in ms + - `mobc_queries_wait_histogram_ms` - Histogram of the wait time of all queries in ms ## Compatibility diff --git a/src/metrics_utils.rs b/src/metrics_utils.rs index 58edd9d..9db01af 100644 --- a/src/metrics_utils.rs +++ b/src/metrics_utils.rs @@ -1,13 +1,17 @@ use metrics::{describe_counter, describe_gauge, describe_histogram}; +// counters pub const OPENED_TOTAL: &str = "mobc_pool_connections_opened_total"; pub const CLOSED_TOTAL: &str = "mobc_pool_connections_closed_total"; -pub const OPEN_CONNECTIONS: &str = "mobc_pool_connections_open"; +// gauges +pub const OPEN_CONNECTIONS: &str = "mobc_pool_connections_open"; pub const ACTIVE_CONNECTIONS: &str = "mobc_pool_connections_busy"; pub const IDLE_CONNECTIONS: &str = "mobc_pool_connections_idle"; -pub const WAIT_COUNT: &str = "mobc_client_queries_wait"; -pub const WAIT_DURATION: &str = "mobc_client_queries_wait_histogram_ms"; +pub const WAIT_COUNT: &str = "mobc_queries_wait"; + +// histogram +pub const WAIT_DURATION: &str = "mobc_queries_wait_histogram_ms"; pub fn describe_metrics() { describe_counter!(OPENED_TOTAL, "Total number of Pool Connections opened");