monitoring: finer histogram boundaries in prometheus metrics (fix #531)

This commit is contained in:
Alex Auvolat 2024-01-15 17:33:35 +01:00
parent ee7fe27d3d
commit f512609123
No known key found for this signature in database
GPG key ID: 0E496D15096376BE

View file

@ -34,7 +34,14 @@ pub async fn run_server(config_file: PathBuf, secrets: Secrets) -> Result<(), Er
// ---- Initialize Garage internals ---- // ---- Initialize Garage internals ----
#[cfg(feature = "metrics")] #[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..."); info!("Initializing Garage main data store...");
let garage = Garage::new(config.clone())?; let garage = Garage::new(config.clone())?;