From 8d1a7d1fd90a359eee553774655c9b7fc3e41233 Mon Sep 17 00:00:00 2001 From: Jesper Jensen Date: Sun, 8 Feb 2026 00:42:32 +0100 Subject: Automatically run at expire times --- src/metrics.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/metrics.rs') diff --git a/src/metrics.rs b/src/metrics.rs index a7e8f11..9ae8ead 100644 --- a/src/metrics.rs +++ b/src/metrics.rs @@ -23,6 +23,7 @@ pub struct Metrics { pub http_request: CounterVec, pub http_request_duration: HistogramVec, pub run_duration: Gauge, + pub next_wakeup: Gauge, pub git_operations: CounterVec, pub db_query_duration: Histogram, registry: Registry, @@ -70,6 +71,11 @@ impl Metrics { ).unwrap(); registry.register(Box::new(run_duration.clone())).unwrap(); + let next_wakeup = Gauge::with_opts( + Opts::new("vbump_next_wakeup_seconds", "Unix timestamp of next scheduled wakeup"), + ).unwrap(); + registry.register(Box::new(next_wakeup.clone())).unwrap(); + let git_operations = CounterVec::new( Opts::new("vbump_git_operations_total", "Git commits/pushes (success/failure)"), &["operation", "outcome"], @@ -92,6 +98,7 @@ impl Metrics { http_request, http_request_duration, run_duration, + next_wakeup, git_operations, db_query_duration, registry, -- cgit v1.2.3