Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Remove "client" from metrics names #76

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
chore(metrics): Comment code to make it easier to understand
janpio authored Sep 20, 2023
commit c6865ddbb1728e97e863bce6c0505366513c59bb
6 changes: 5 additions & 1 deletion src/metrics_utils.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
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";

// histogram
pub const WAIT_DURATION: &str = "mobc_client_queries_wait_histogram_ms";

pub fn describe_metrics() {