-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from Yisaer/add_metrics
feat: add records in/out metrics
- Loading branch information
Showing
3 changed files
with
22 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,12 @@ | ||
use prometheus::{register_int_gauge, IntGauge}; | ||
use prometheus::{register_int_counter, register_int_gauge, IntCounter, IntGauge}; | ||
|
||
lazy_static! { | ||
pub static ref CPU: IntGauge = | ||
register_int_gauge!("cpu_usage", "CPU usage in percentage").unwrap(); | ||
pub static ref MEMORY: IntGauge = | ||
register_int_gauge!("memory_usage", "Memory usage in bytes").unwrap(); | ||
pub static ref RECORDS_IN: IntCounter = | ||
register_int_counter!("records_in", "message records in").unwrap(); | ||
pub static ref RECORDS_OUT: IntCounter = | ||
register_int_counter!("records_out", "message records in").unwrap(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters