aboutsummaryrefslogtreecommitdiff
path: root/src/garage/server.rs
diff options
context:
space:
mode:
authorAlex <alex@adnab.me>2024-01-15 16:44:58 +0000
committerAlex <alex@adnab.me>2024-01-15 16:44:58 +0000
commita6421ee5a5866828961a17368272c6c3af1ef0ba (patch)
tree74e66e0bb77205712c422cface9e2807d3c10264 /src/garage/server.rs
parent993ce74976cd07eec927460af11fa8328f51206d (diff)
parentf512609123fdf374839ca2a8385ddda8694d09fa (diff)
downloadgarage-a6421ee5a5866828961a17368272c6c3af1ef0ba.tar.gz
garage-a6421ee5a5866828961a17368272c6c3af1ef0ba.zip
Merge pull request 'monitoring: finer histogram boundaries in prometheus metrics (fix #531)' (#686) from fix-531 into main-0.8.x
Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/686
Diffstat (limited to 'src/garage/server.rs')
-rw-r--r--src/garage/server.rs9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/garage/server.rs b/src/garage/server.rs
index 25d4b845..ac76a44d 100644
--- a/src/garage/server.rs
+++ b/src/garage/server.rs
@@ -34,7 +34,14 @@ pub async fn run_server(config_file: PathBuf, secrets: Secrets) -> Result<(), Er
// ---- Initialize Garage internals ----
#[cfg(feature = "metrics")]
- let metrics_exporter = opentelemetry_prometheus::exporter().init();
+ let metrics_exporter = opentelemetry_prometheus::exporter()
+ .with_default_summary_quantiles(vec![0.25, 0.5, 0.75, 0.9, 0.95, 0.99])
+ .with_default_histogram_boundaries(vec![
+ 0.001, 0.0015, 0.002, 0.003, 0.005, 0.007, 0.01, 0.015, 0.02, 0.03, 0.05, 0.07, 0.1,
+ 0.15, 0.2, 0.3, 0.5, 0.7, 1., 1.5, 2., 3., 5., 7., 10., 15., 20., 30., 40., 50., 60.,
+ 70., 100.,
+ ])
+ .init();
info!("Initializing Garage main data store...");
let garage = Garage::new(config.clone())?;