Constellation, Spacedust, Slingshot, UFOs: atproto crates and services for microcosm
0

Configure Feed

Select the types of activity you want to include in your feed.

hopefully fix metrics unit flakiness

`describe_`s run early now, from one place

+7 -8
+7 -8
constellation/src/bin/main.rs
··· 190 190 } 191 191 })?; 192 192 193 + // Install metrics server only if requested 194 + if collect_metrics { 195 + install_metrics_server(metrics_bind)?; 196 + } 197 + 193 198 let qsize = Arc::new(AtomicU32::new(0)); 194 199 195 200 thread::scope(|s| { ··· 225 230 .enable_all() 226 231 .build() 227 232 .expect("axum startup") 228 - .block_on(async { 229 - // Install metrics server only if requested 230 - if collect_metrics { 231 - install_metrics_server(metrics_bind)?; 232 - } 233 - serve(readable, bind, did_web_domain, staying_alive).await 234 - }) 233 + .block_on(serve(readable, bind, did_web_domain, staying_alive)) 235 234 .unwrap(); 236 235 stay_alive.drop_guard(); 237 236 } ··· 244 243 let check_alive = stay_alive.clone(); 245 244 246 245 let process_collector = metrics_process::Collector::default(); 247 - process_collector.describe(); 248 246 if let Some(ref p) = data_dir { 249 247 if let Err(e) = fs4::available_space(p) { 250 248 eprintln!("fs4 failed to get available space. may not be supported here? space metrics may be absent. e: {e:?}"); ··· 313 311 } 314 312 315 313 fn describe_metrics() { 314 + metrics_process::Collector::default().describe(); 316 315 describe_gauge!( 317 316 "storage_available", 318 317 Unit::Bytes,