Skip to content

Open source, composable payments platform | PCI compliant | SaaS and Self-host options | Enables connectivity to multiple payment, payout, fraud, vault and tokenization providers | Uplifts authorization with intelligent routing and revenue recovery | Reduce payment processing costs with cost observability | Reduces payment ops with reconciliation

chore(metrics): adjust f64 histogram buckets size (#12884)

Shivansh Mathur2782cdb3c385
diff --git a/crates/router_env/src/metrics.rs b/crates/router_env/src/metrics.rs
index e65364651c..c8dafedd25 100644
--- a/crates/router_env/src/metrics.rs
+++ b/crates/router_env/src/metrics.rs
@@ -139,12 +139,12 @@ mod helpers {
/// Returns the buckets to be used for a f64 histogram
#[inline(always)]
pub fn f64_histogram_buckets() -> Vec<f64> {
- let mut init = 0.01;
- let mut buckets: [f64; 15] = [0.0; 15];
+ let mut init = 0.000_001;
+ let mut buckets: [f64; 30] = [0.0; 30];
for bucket in &mut buckets {
- init *= 2.0;
*bucket = init;
+ init *= 2.0;
}
Vec::from(buckets)