mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-30 01:27:31 +08:00
feat(generics): add metrics for database calls (#1901)
This commit is contained in:
@ -98,3 +98,13 @@ pub(crate) mod diesel_impl {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) mod metrics {
|
||||
use router_env::{counter_metric, global_meter, histogram_metric, metrics_context, once_cell};
|
||||
|
||||
metrics_context!(CONTEXT);
|
||||
global_meter!(GLOBAL_METER, "ROUTER_API");
|
||||
|
||||
counter_metric!(DATABASE_CALLS_COUNT, GLOBAL_METER);
|
||||
histogram_metric!(DATABASE_CALL_TIME, GLOBAL_METER);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user