@@ -290,6 +290,7 @@ pub fn try_install(port: u16, gauge_idle_timeout_secs: u64) -> Result<(), Metric
290290 metrics:: set_global_recorder ( recorder)
291291 . map_err ( |_error| MetricsInstallError :: RecorderConflict ) ?;
292292 describe_readiness_metrics ( ) ;
293+ describe_community_admission_metrics ( ) ;
293294 describe_db_pool_metrics ( ) ;
294295 describe_auth_metrics ( ) ;
295296 initialize_auth_metric_series ( ) ;
@@ -306,24 +307,42 @@ pub fn install(port: u16, gauge_idle_timeout_secs: u64) {
306307 . unwrap_or_else ( |error| panic ! ( "metrics exporter must install exactly once: {error}" ) ) ;
307308}
308309
309- /// Register the frozen readiness metric descriptions with the active recorder.
310+ /// Register the frozen readiness and dependency-diagnostic metric descriptions.
311+ ///
312+ /// The two `buzz_readiness_*` probe families describe local process lifecycle.
313+ /// The dependency families keep their names for dashboard continuity but are
314+ /// published by the per-pod dependency sampler, not by the Kubernetes probe or
315+ /// by an `/_status` request — a shared-dependency failure no longer deroutes
316+ /// the pod, and nobody has to read the endpoint for the metrics to move.
310317pub ( crate ) fn describe_readiness_metrics ( ) {
311318 metrics:: describe_counter!(
312319 "buzz_readiness_checks_total" ,
313- "Kubernetes health-listener readiness probes by terminal bounded reason"
320+ "Kubernetes health-listener readiness probes by lifecycle reason (ready, shutting_down) "
314321 ) ;
315322 metrics:: describe_counter!(
316323 "buzz_readiness_dependency_checks_total" ,
317- "Completed readiness dependency attempts by dependency and bounded outcome"
324+ "Completed dependency-sampler attempts by dependency and bounded outcome"
318325 ) ;
319326 metrics:: describe_histogram!(
320327 "buzz_readiness_check_duration_seconds" ,
321328 metrics:: Unit :: Seconds ,
322- "Completed readiness check duration without outcome label multiplication"
329+ "Completed dependency-sampler check duration without outcome label multiplication"
323330 ) ;
324331 metrics:: describe_gauge!(
325332 "buzz_readiness_state" ,
326- "Latest publishable readiness state by check, where 1 is ready and 0 is not ready"
333+ "Latest private readiness-probe observation, where 1 is ready and 0 is shutting down"
334+ ) ;
335+ metrics:: describe_gauge!(
336+ "buzz_readiness_dependency_sample_completed_timestamp_seconds" ,
337+ "Unix time the cached /_status dependency report completed, absent until the first sample completes; sampler completion advances it and the publisher re-emits it"
338+ ) ;
339+ }
340+
341+ /// Register the bounded community-admission contract.
342+ pub ( crate ) fn describe_community_admission_metrics ( ) {
343+ metrics:: describe_counter!(
344+ "buzz_community_admission_checks_total" ,
345+ "Durable community-active checks at socket admission by bounded outcome"
327346 ) ;
328347}
329348
@@ -541,7 +560,17 @@ pub(crate) fn readiness_test_recorder() -> (
541560 metrics_exporter_prometheus:: PrometheusRecorder ,
542561 metrics_exporter_prometheus:: PrometheusHandle ,
543562) {
544- let recorder = configured_prometheus_builder ( 300 ) . build_recorder ( ) ;
563+ readiness_test_recorder_with_idle_timeout ( 300 )
564+ }
565+
566+ #[ cfg( test) ]
567+ pub ( crate ) fn readiness_test_recorder_with_idle_timeout (
568+ gauge_idle_timeout_secs : u64 ,
569+ ) -> (
570+ metrics_exporter_prometheus:: PrometheusRecorder ,
571+ metrics_exporter_prometheus:: PrometheusHandle ,
572+ ) {
573+ let recorder = configured_prometheus_builder ( gauge_idle_timeout_secs) . build_recorder ( ) ;
545574 let handle = recorder. handle ( ) ;
546575 ( recorder, handle)
547576}
0 commit comments