from prometheus_client import Counter, Gauge, Histogram docs_total = Counter( "pngx_sync_docs_total", "Total documents synced", ["replica", "status"], ) sync_duration = Histogram( "pngx_sync_duration_seconds", "Sync cycle duration in seconds", ["triggered_by"], ) replica_lag = Gauge( "pngx_replica_lag_seconds", "Seconds since last successful sync", ["replica"], ) replica_pending_tasks = Gauge( "pngx_replica_pending_tasks", "Pending tasks awaiting resolution", ["replica"], ) replica_consecutive_failures = Gauge( "pngx_replica_consecutive_failures", "Consecutive sync cycle failures per replica", ["replica"], ) sync_running = Gauge( "pngx_sync_running", "Whether a sync cycle is currently running", )